Sending Result set data in an email

Last Post 24 Apr 2008 10:27 PM by SQLUSA. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

24 Apr 2008 12:42 PM
Has anyone sent the result set data in the body of an email before?

I am not talking about building a flat file out of a query and then attaching it to the email.

Thank you.
New Member
New Member

24 Apr 2008 10:27 PM

EXEC msdb.dbo.sp_send_dbmail
@recipients = '',
@query = 'select * from AdventureWorks.HumanResources.Department' ,
@subject = 'Deparment Summary'

Kalman Toth - Database, Data Warehouse & Business Intelligence Architect
SQL Server Training, SSAS, SSIS, SSRS:

Acceptable Use Policy