Microsoft
Software
Hardware
Network
Question : Database Mail - Multiple queries within sp_send_dbmail.
Hi guys,
I was wondering if anyone had any luck running multiple queries within sp_send_dbmail.
What I would like to do is either :
1. Attach more than 1 attachment, each being the result of different queries ,or
2. Attach these results in different sheets within my excel attachment that is being sent via sp_send_dbmail.
Thanks for you assistance.
Regards,
Vinay
Answer : Database Mail - Multiple queries within sp_send_dbmail.
sp_send_dbmail accepts only 1 sql query parameter.
For more complex requierments, you can try using the SSIS packages to run mulitple queries and generate multiple files (1 file multiple sheets).. and then send them using the send mail task
Random Solutions
Page life expectancy
OK to remove "Windows\TEMP ?
Regional settings GREEK , decimal separator "," sql server 2000, But does not update a textbox tha binds to a float field,C# framework 2.0
Find a Text in a cell and copy it to another cell.
Access 2003: shell command - quest 2
How to get reference to AxWebbrowser
VBA code to paste into webpage textbox and select from a dropdown box.
How to export data from various tables into a single xml file
Import binary data into SQL 2005
Wrong NT group names