Skip to main content
Improved formatting, added TYPE directive, and BOL link
Source Link
Paul White
  • 90.3k
  • 30
  • 424
  • 663

Try changing you statement to match this:

FOR XML PATH('')).value('.','varchar(max)')

FOR XML PATH(''), TYPE).value('(./text())[1]','varchar(max)')

And see how it works for youThis uses the .value xml method to solve your entitization problem.

Try changing you statement to match this:

FOR XML PATH('')).value('.','varchar(max)')

And see how it works for you.

Try changing you statement to match this:

FOR XML PATH(''), TYPE).value('(./text())[1]','varchar(max)')

This uses the .value xml method to solve your entitization problem.

Source Link

Try changing you statement to match this:

FOR XML PATH('')).value('.','varchar(max)')

And see how it works for you.