I have a table which has XMLData column as TEXT. How can i read the data from this column
Share
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.
As long as that column is of type
TEXT, you won’t be able to do anything useful with it, really.TEXTalso has been deprecated and will be removed in a future version of SQL Server – stop using it.If it stores XML and only XML – make it of datatype
XML.One you have that, you can either extract individual items of information from that XML using XPath and XQuery – something like:
or if you have multiple items in a list-like structure inside your XML, you can create a “pseudo-table” of XML items based on an XPath expression.
So your plan of action should be:
XML