Question : converting xml to varchar

Is it possible to convert xml to varchar using cast command?

I am getting the error in multiple collations:
"Conversion of one or more characters from XML to target collation impossible"

Thanks

Answer : converting xml to varchar

The collation of the varchar column does not recognize some characters contained in XML. And to change some characters in XML is not allowed because it could change its meaning in unpredictable way.

If you use nvarchar then no conversion is needed because all characters are encoded in doublebyte Unicode.
Random Solutions  
 
programming4us programming4us