October 20, 2006 at 3:36 pm
OSQL's "-s" parameter accepts a single character to use as column delimiters for any result sets it may produce in it's output and it defaults to space. I've tried just about everything I know to get it to accept the TAB character (also known as ^I, Char(9), \t, and a couple of other permutations) but no luck, yet.
Anybody know how to set the -s parameter of OSQL to the TAB character?
Yep, I know... could use BCP in the QUERY mode to call a proc or select from a view... but the OSQL thing is bugging me and just wanted to know if there was a solution to setting the -s parameter to a TAB.
Thanks folks.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2006 at 3:03 am
Did you try to be dummy?
-s" "
Enter TAB between quotes using Notepad.
Somewhere in previous life I read that command prompt is a text editor, so it may work.
_____________
Code for TallyGenerator
October 21, 2006 at 7:41 pm
Thanks for trying, Serqiy... the tab gets converted to "~WRF0409.tmp" when pasted back into a CMD window. Have tried ALT-0-9, Ctrl-I, etc... all have the same effect. And, haven't been able to find an override for it.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2006 at 7:45 pm
No, I mean create ".bat" file in Notepad or something like that and run it from cmd.
_____________
Code for TallyGenerator
October 21, 2006 at 7:53 pm
Oh... when you said "Did you try to be dummy?", I didn't realize I had to be THAT dumb to get this to work That worked like a charm, old friend. Thanks.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2006 at 8:03 pm
I was just thinking - if such guy like Jeff cannot find the solution it must be something really stupid.
See - I was right!
Again.
_____________
Code for TallyGenerator
October 21, 2006 at 8:22 pm
Not nearly as stupid as trying to emulate spreadsheets in a database, eh? Should'a listened to you on THAT one...
Thanks again, Serqiy.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply