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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delimiting file through DTS

Status
Not open for further replies.

sgd3476

Programmer
Mar 3, 2003
37
US
I've created a DTS package to export a query from SQL. I need to have the file comma or pipe delimited. The file is too large to manually delimit.
Thanks for any help.

Steve
 
Why use dts? It's a single sql statement to do it via bcp

exec master..xp_cmdshell 'bcp "myquery" out c:\myfile.txt -c -t|'

see bcp in bol.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Always remember bcp !!
When DTS came out, my Microsoft buddy told me it was bcp on steroids.


Sometimes the grass is greener on the other side because there is more manure there - original.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top