-You might use SQL Server Management Studio (SSMS) to issue a query that uses the FOR XML clause. Sometimes a large amount of XML is returned and displayed in one grid cell. The XML string could be longer than one SSMS grid cell can hold on a single line. In these cases, SSMS might insert line break characters between long segments of the whole XML string. Such line breaks might occur in the middle of a substring that should not be split across lines. You can prevent the line breaks by using a cast AS XMLDATA. This solution can also apply when you use FOR JSON PATH. The technique is discussed on Stack Overflow, and is shown in the following Transact-SQL sample SELECT statement:
0 commit comments