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
Cannot uninstall Exchange 2010 Hub transport role of previously deleted 2008 R2 server
Get Terminal Server Client Name via T-SQL
Great Plains 10 Custom Report - Multiple Comanies different form layout
Using Workbook.SaveAs in Access with VBA generates Error 1004???
synchtableconfigmanager threw an exception while trying to add a datasource
IAS Service Stoping with Member Not Found error.
NAVISION 4.02 SP2 issues copying from Excel into NAVISION, whats the root cause?
EBS 2008 install problem, migrating from SBS 2003
EMF files
How do I use a query and form together