|
Question : set isql output file format
|
|
How can I set the output file format of a command-line isql call to output to csv, with the trailing spaces removed from each field?
Basically I want my output file to look like the output you would get if you set QueryOptions --> FormatOptions --> ResultOutputFormat --> CommaSeparated(CSV) within ISQL/w and saved its results. I just want to be able to do it from the command line.
Using MS SQL6.5 and have a Query input file. All required fields are of type VARCHAR(x)
|
|
Answer : set isql output file format
|
|
iF you use the /s option you can specify comma column separatot but you will get padding, The only way not to get padding is to use BCP, you would then have to use a view as well i.e you BCP out a view on comma delimited format.
|
|
|