-- 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
"A_Michigan_User" (Michigan_RE_M0VE@.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, esquel@.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
Wednesday, March 7, 2012
oSql is adding line-breaks when "-output" or ">" is used to save output to a file.
Labels:
123456789123456789print,
adding,
database,
file,
hereprint,
line-breaks,
line-wrapping,
microsoft,
mysql,
oracle,
osql,
output,
save,
server,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment