Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 sql job result in a csv format file

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-09-12 : 07:39:56
Sharat writes "Hi, how can i generate a CSV format file using a sql job?

i am running some select statement on sql job which creates a output file (text file), i want this file in CSV format, what should i do, kindly guide me.

regards

Sharat"

AndyThissen
Starting Member

7 Posts

Posted - 2005-09-14 : 17:29:46
Create a DTs package to do it or run something like this

osql -S ServerName -U userID -P password -h-1 -n -d DBname -s "," -w 1000 -i c:\junk\SQLBATScripts\GetJobInfo.sql -o c:\junk\logs\GetJobInfo.txt This will set the delimiter to a comma, read in a sql query and output to a file with no headers and no counts.
Go to Top of Page
   

- Advertisement -