I was wondering if I CAN ORDER at my request a node of a column with typed XML?
For example, I have a table
ID (int) | Data (XML)
The Data column stores XML in a form similar to this
<?xml?>
<Data>
<SimpleOrderedValue>1</SimpleOrderedValue>
<ComplicatedInternals>
...
</ComplicatedInternals>
</Data>
I want to query this table ordered by SimpleOrderedValue. Can I do this on MS SQL Server 2008 with an XML column? Or I can do thins using the CLR UDT, but without an extra computed column and so that the Data column is indexed (for faster searches).
Thanks any help. Thank.
source
share