Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 No Headers in OSQL output

Author  Topic 

parkerbw2000
Starting Member

4 Posts

Posted - 2004-11-01 : 11:50:56
Is there an option I can set in the following osql to retrieve only the data without headers ? I have set col separator to null, turned off numbering, but I keep getting headers even when I added -h "" :
osql -n -s "" -S server -d database -U userid -P password -i test.sql -o test.txt

Any help very much appreciated....

parkerbw2000
Starting Member

4 Posts

Posted - 2004-11-01 : 11:58:01
Also, it limits my output to 80 bytes per line, the select I'm using is approx 2450 bytes per row output?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-11-01 : 14:05:37
You need to use -h-1 (exactly like that, no spaces) if you want no headers at all. You should also use the -w paramter with a value of 2500 or higher. Books Online has the details on all the osql options.
Go to Top of Page
   

- Advertisement -