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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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: