failed to remove the extra tabs between rows of data return from the
osql output.
how to detect the row delimiter?
i noticed i can use bcp to have a more decent output file, but i don't
want to do too much of file read-write. the programming enviroment is
quite easy to "capture" the output from the comand prompt.
secondary, char(252), 253, 254, 255 is not being read by the command
prompt, for example, 253 turns into 132 when i decode the input.
thankx.
from alan.Alan Zhong (alanchinese@.yahoo.com) writes:
> hi, i had been removed the row counts and the column spaces... but i
> failed to remove the extra tabs between rows of data return from the
> osql output.
> how to detect the row delimiter?
> i noticed i can use bcp to have a more decent output file, but i don't
> want to do too much of file read-write. the programming enviroment is
> quite easy to "capture" the output from the comand prompt.
I'm afraid that I don't understand the question really. You can use
the -s option to OSQL to change the column delimiter, but you will
still get lots of extra spaces. I don't know really what you want to
do, but it sounds like you should fo with BCP.
> secondary, char(252), 253, 254, 255 is not being read by the command
> prompt, for example, 253 turns into 132 when i decode the input.
OSQL is a command-line, and a the command-line world in Windows uses
a different character set than Windows applications. (DOS legacy.)
But OSQL is able to read and write Unicode files, and with Unicode
files you don't have this issue.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
No comments:
Post a Comment