Having a nvarchar column containing xml. Is there an easy way to find those rows where:
CONVERT(xml, XML, 2)
does not work? Thanks.
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.
What would do the job is TRY_CONVERT, but that’s new in SQL 2012.
So, pre 2012, the only other way I can think of is to create a SQLCLR function to try parsing the value into a XML blob.