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.
| Author |
Topic |
|
kwilliams
194 Posts |
Posted - 2004-04-21 : 14:39:48
|
| I have a DTS package that does the following:1) Runs 3 queries that create 3 new views2) Runs 3 stored procedures that query the views3) Drops the 3 viewsI want to add an additional step between 2 and 3 in which the pkg will email the results from the 3 stored procedures into one email either as 3 txt attachments, or in the email itself.So I added a "Send Mail Task" to the package before it drops the 3 views. It does email properly, but I'm not sure of the syntax that's needed to add the results from the 3 SP's to the email itself. How do I go about doing this? Any & all help is appreciated. Thanks.KWilliams |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-04-21 : 14:43:03
|
| Instead of using the Send Mail Task, use an Execute SQL Task with xp_sendmail. I would put the three stored procedure calls into one stored procedure. Then execute the one stored procedure in xp_sendmail so that it all gets done in one e-mail.Tara |
 |
|
|
kwilliams
194 Posts |
Posted - 2004-04-21 : 14:47:36
|
| Ok, thanks Tara! I'll see what I can do. |
 |
|
|
|
|
|