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)
 Results of DTS Proc call saved to tab delimited file

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-08-19 : 07:51:54
Mike writes "This is pretty basic I know, but DTS is not my strong suit. I need to execute a stored procedure and the results saved to a tab delimited file. The kicker is, I need to populate this tab delimited file by making multiple selects or I might be able to find a way to associate them as a join. I can settle that issue later. My main problem is getting the results to the tab delimted file, save it, then e-mail it to multiple people. Any advice would be greatly appreciated."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-19 : 08:18:18
bcp will do this

exec master..xp_cmdShell 'bcp "Select columns from DBName..tableName" queryout "C:\test.txt" -c'

For sending email, refer this
http://sqlteam.com/forums/topic.asp?TOPIC_ID=45670

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -