• To Sam Bendayan,

    I couldn't get my SQL to appear correctly--the HTML editor won't display the CDATA section right.

    Here's the first part:SELECT CONVERT(xml, '' + column + '') AS ColumnXML FROM TABLE

    That part works if your string doesn't have any XML reserved characters like < or &. To be safe, you need to account for those, so you can include a CDATA section inside the x tag, and put your column inside the CDATA. Unfortunately, there's no way to show you the actual syntax--nothing lets me actually display a CDATA section here. This is as close as I can get: SELECT CONVERT(xml, '*![CDATA[' + column + ']]*') AS ColumnXML FROM TABLE

    Replace the asterisks with open and close tags, and you're good.