how to get the full resultset from SSMS

后端 未结 5 1514
南笙
南笙 2020-12-04 22:29

How do you get back the full content of rows in SQL Server Management Studio?

If you use \"results to grid\" the data is encoded, so things like line breaks are lost

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 23:02

    I cast it to XML

    select @variable_with_long_text
     as [processing-instruction(x)] FOR XML PATH 
    

    The processing-instruction bit is there to stop it entitising characters such as < to <

提交回复
热议问题