I am using the following SP to export a view to a file:
SET NOCOUNT ON;
declare @line varchar(255)
set @line = 'bcp "SELECT * FROM erpSqlBe.dbo.vwPriceListStockxx for xml , root(''daily'')" queryout "d:\myFolder\Daily.xml" -c -CACP -Uyyy -Pzzz '
SELECT @line
EXEC xp_cmdshell @line
The resulting file has a CRLF inserted every 2034 characters, making the file unreadable. What is the fix for this ?
I found this answer, but I don't know how to apply it here.
Thanks