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)
 Sending email reports using DTS

Author  Topic 

kevinlcarlson
Starting Member

1 Post

Posted - 2008-10-24 : 16:21:10
I'd like to use DTS to send customized query results to each email address in a list of about 60 recipients (the list being generated using a separate query).

I have created and modified a few DTS scripts where each recipient gets an identical report as an Excel attachment. To make a set of email reports, each with customized content, will I need to set up a cursor and step through an outer loop, passing email addresses to an inner loop which then runs a separate query for each user?

Or, is there a better way to accomplish this? I don't need to make Excel attachments, just to be able to add report data to each message body and email using xp_smtp_sendmail.

I searched in the forums here but didn't find what I was looking for; Links or sample code would be greatly appreciated!

TIA,
Kevin

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-30 : 14:33:11
cant you store the customised result onto a vraiable and then use send mail task to send it to your recipients?
Go to Top of Page
   

- Advertisement -