FOR XML output all on one line (from SQL Server 2005 sqlcmd)
843834Jan 4 2007 — edited Jan 11 2007When I use select * from table for XML AUTO via sqlcmd the output all ends up on one line (even for thousands of records). I am pulling my hair out trying to get the output to be formatted (element on each line).
Here is exactly what I am trying:
:XML on
SELECT *
FROM TableName
FOR XML AUTO, ELEMENTS
But I have tried other permeatations as well.