October 25, 2005 at 3:16 pm
I want to use OSQL to run a query then create a readable format text file. I used the -n -h options but still seeing the -- (dash) and the output data are scatted all over the page. Can someone point me to the right direction? Thanks.
October 26, 2005 at 12:51 am
Something like this maybe:
osql -Smyserver -dmaster -E -b -h-1 -r1 -Q "sp_who2" -w200 -n
The -w option sets the page width, which is probably the main cause of data not formatting nicely.
-h-1 turns the headers OFF, which may not be exactly what you want, but I think it's the only way to eliminate the -- (dash) column heading.
You could print your own column headers from your query/SP if you need them.
October 26, 2005 at 10:37 am
Also, when viewing the results online I've found that switching your font to courier 10 will fix quite a bit of your column alignment issues.
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply