How to sort XML Attributes in SQL?
for example for this XML:
<books><book b='' c='' a=''/></books>
I want:
<books><book a='' b='' c=''/></books>
How to sort XML Attributes in SQL?
for example for this XML:
<books><book b='' c='' a=''/></books>
I want:
<books><book a='' b='' c=''/></books>
From http://msdn.microsoft.com/en-us/library/ms187107%28v=sql.90%29.aspx:
So even if you could figure out a way of sorting the attributes, you can not trust that the XML data type in SQL Server will preserve the order you want.