Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

How do I put quotes around a SQL select statement that returns XML value?

$
0
0

I am having trouble putting quotes around the following string value select statement in sql. How do I do it?

Convert(Xml, OM.Body).value('(//DocumentResponseMessage/ecf:Document/ecf:DocumentMetadata/d:RegisterActionDescriptionText)[1]','varchar(250)') AS 'CaseEventDescription',


The reason I need to do that is because the value has a comma in it and when I put the output in Excel, it is not fitting in one column. So putting quotes will help but I don't know exactly how to do it.
Kindly help.

Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>