VitaminD
asked on
Wrapping an email in a stored procedure
I am calling my stored procedure but I need to take the results of my Sproc
and send the results as a csv file in an email
How exactly would I do this?
I am calling this job inside my stored procedure
Exec msdb.dbo.sp_send_dbmail
@profile_name = 'PSDB01@xxxx.com',
@recipients = @EmailRecipients,
@subject = 'Account_Report',
@body = 'File(s) attached'
and send the results as a csv file in an email
How exactly would I do this?
I am calling this job inside my stored procedure
Exec msdb.dbo.sp_send_dbmail
@profile_name = 'PSDB01@xxxx.com',
@recipients = @EmailRecipients,
@subject = 'Account_Report',
@body = 'File(s) attached'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.