January 19, 2009 at 12:52 am
Hi,
I have three different queries and should get populated to three different excel sheets in the same excel work book...
i was able to send 3 queries result to single excel sheet using sp_send_dbmail
code:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'PMDBOSW',
@recipients = 'nswetha03@gmail.com',
@query ='set nocount on; exec dbo.SEND_THIS_MAIL; set nocount off;',
@subject = 'Work Order Count',
@attach_query_result_as_file = 1,
@query_attachment_filename ='D:\SWETHA.XLS' ;
SEND_THIS_MAIL is a proc which returns the multi query result set.
let me know the procedure if it can be done......
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy