ISQL – Print more than 256 characters on a line | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

ISQL – Print more than 256 characters on a line

I am using isql to execute a stored procedure and write the output to a file.
I need the output to be on a single line. however the output beyond 256 characters is getting truncated even though i am using -w500 switch
isql -Uabc -Pabc -dDesktop -SMyserver -Q "exec MyProc" -o D:appslogout.txt -n -w300
Any pointers??
Are you using PRINT statement in that stored procedure?
Unfortunately PRINT always wraps at 256 characters, and SELECT always has a blank line between results in the output. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
I am using select only but still it wraps at 256 characters. I dont mind a blank line at the end of the output.
I am using -n -w300 switches
Why don’t you take help of BCP in this case, it will do the work. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
Okay, i managed to make it work <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ /><br />ISQL truncates all varchar data to 255 chars, so i converted it to text using CONVERT function and it worked<br />Thanks to everyone for their help
]]>