Home All Groups Group Topic Archive Search About

oSql is adding line-breaks when "-output" or ">" is used to save output to a file.

Author
30 Mar 2007 2:20 AM
"A_Michigan_User\
-- No line-wrapping here:
PRINT '123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789'
PRINT '123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789'
PRINT '123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789'

I save the above 3 lines to a text-file called:  oSqlTest.sql

When I execute it... "A" works fine... but "B" and "C" all have unneeded
linefeeds appearing
in the output file.   How do I get rid of them?

A> oSql -n    -i oSqlTest.sql
B> oSql -n    -i oSqlTest.sql     -o 1.txt
C> oSql -n    -i oSqlTest.sql     >2.txt

Author
31 Mar 2007 10:13 PM
Erland Sommarskog
"A_Michigan_User" (Michigan_RE_M***@ameritech.net) writes:
> I save the above 3 lines to a text-file called:  oSqlTest.sql
>
> When I execute it... "A" works fine... but "B" and "C" all have unneeded
> linefeeds appearing
> in the output file.   How do I get rid of them?
>
> A> oSql -n    -i oSqlTest.sql
> B> oSql -n    -i oSqlTest.sql     -o 1.txt
> C> oSql -n    -i oSqlTest.sql     >2.txt

Try the -w option.


--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

AddThis Social Bookmark Button