I have a large XML note with many nodes.
is there a way that I can select only a single node and all of its contents from the larger XML?
i am using sql 2005
I have a large XML note with many nodes.
is there a way that I can select only a single node and all of its contents from the larger XML?
i am using sql 2005
You should use the query() Method if you want to get a part of your XML.
Result:
If you want the value from a specific node you should use value() Method.
Result:
Update:
If you want to shred your XML to multiple rows you use nodes() Method.
To get values:
Result:
To get the entire XML:
Result: