Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column Too Wide in Export to CSV

Status
Not open for further replies.

cghoga

Programmer
Jun 26, 2003
614
US
Greetings,

When exporting qry resuts to CSV one column is so wide it wraps to the next row and the columns after it.

Is there a way to 'force' all columns on one line? or a format besides csv that I could export to?

Here is my batch code...

Code:
C:
cd Program Files\Microsoft SQL Server\80\Tools\Binn
dir
sqlcmd.exe -S PROD01 -w 2000 -s "," -d medical -U access -P access -i "H:\AutomatedScripts\HM_v1_07172009.sql" -o "H:\AutomatedScripts\HM_Output.csv"
H:
cd \AutomatedScripts
email_hm_file.vbs

Thanks for your time and help,

cgh



 
Sure one of the experts will know, but -y or -Y rings a bell in my head.
 
Thanks mutley1, after further research I cannot find a tie to -Y.

I did find a couple of articles where folks had encountered the same issue and could not find a workaround.

I did see something about BCP, but I would like to keep this as simple as possible.

If anyone has any other ideas pls let me know.

Thanks again,

cgh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top