Microsoft KB Archive/182021

= INF: ISQL Output to a Text File Will Wrap Lines Longer Than 733 Characters =

Article ID: 182021

Article Last Modified on 2/20/2004

-

APPLIES TO


 * Microsoft SQL Server 6.0 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q182021



SUMMARY
When you direct isql output to a text file, you are limited to 733 characters per line. The remainder of the line follows a cr/lf/tab (control, line feed, tab). A column does not split; that is, the output will break wherever it is needed to ensure that a column's output is not split across the lines. Thus if you direct the output as char(255), char(255), char(230), the result is a break at 510 characters with the remaining 230 characters on the second line.



MORE INFORMATION
The following scenario demonstrates this behavior.

drop table isqltest go create table isqltest (col1 char(255), col2 char(255), col3 char(200), a char(20), b char(1), c char(1), d char(1), e char(1)) go insert isqltest values('1234567890123456789012345678901234567890123456789012345678901234567 890123456789012345678901234567890123456789012345678901234567890123456789012 345678901234567890123456789012345678901234567890123456789012345678901234567 89012345678901234567890123456789012345','1234567890123456789012345678901234 567890123456789012345678901234567890123456789012345678901234567890123456789 012345678901234567890123456789012345678901234567890123456789012345678901234 56789012345678901234567890123456789012345678901234567890123456789012345','1 234567890123456789012345678901234567890123456789012345678901234567890123456 789012345678901234567890123456789012345678901234567890123456789012345678901 2345678901234567890123456789012345678901234567890','AAAAAAAAAAAAAAAAAAAA',' A','A','A','A') insert isqltest values('1234567890123456789012345678901234567890123456789012345678901234567 890123456789012345678901234567890123456789012345678901234567890123456789012 345678901234567890123456789012345678901234567890123456789012345678901234567 89012345678901234567890123456789012345','1234567890123456789012345678901234 567890123456789012345678901234567890123456789012345678901234567890123456789 012345678901234567890123456789012345678901234567890123456789012345678901234 56789012345678901234567890123456789012345678901234567890123456789012345','1 234567890123456789012345678901234567890123456789012345678901234567890123456 789012345678901234567890123456789012345678901234567890123456789012345678901 2345678901234567890123456789012345678901234567890','AAAAAAAAAAAAAAAAAAAA',' A','A','A','A') insert isqltest values('1234567890123456789012345678901234567890123456789012345678901234567 890123456789012345678901234567890123456789012345678901234567890123456789012 345678901234567890123456789012345678901234567890123456789012345678901234567 89012345678901234567890123456789012345','1234567890123456789012345678901234 567890123456789012345678901234567890123456789012345678901234567890123456789 012345678901234567890123456789012345678901234567890123456789012345678901234 56789012345678901234567890123456789012345678901234567890123456789012345','1 234567890123456789012345678901234567890123456789012345678901234567890123456 789012345678901234567890123456789012345678901234567890123456789012345678901 2345678901234567890123456789012345678901234567890','AAAAAAAAAAAAAAAAAAAA',' A','A','A','A') go

The isql command to execute:

ISQL /n /h-1 /Sa_pkalba1 /d pubs /U sa /P /w 740 /s /Q "Select * from isqltest" /o isqltest.txt

The output in isqltest.txt appears as:

123456789012345678901234567890123456789012345678901234567890123456789012345 678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345 678901234567890123456789012345123456789012345678901234567890123456789012345 678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345 678901234567890123456789012345678901234567890123456789012345123456789012345 678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345 67890123456789012345678901234567890AAAAAAAAAAAAAAAAAAAAAAA A 123456789012345678901234567890123456789012345678901234567890123456789012345 678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345 678901234567890123456789012345123456789012345678901234567890123456789012345 678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345 678901234567890123456789012345678901234567890123456789012345123456789012345 678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345 67890123456789012345678901234567890AAAAAAAAAAAAAAAAAAAAAAA A 123456789012345678901234567890123456789012345678901234567890123456789012345 678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345 678901234567890123456789012345123456789012345678901234567890123456789012345 678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345 678901234567890123456789012345678901234567890123456789012345123456789012345 678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345 67890123456789012345678901234567890AAAAAAAAAAAAAAAAAAAAAAA A

(3 rows affected)

Keywords: kbinfo KB182021

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.