Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Email result of a select statement

Author  Topic 

Raj_Mahendran
Starting Member

14 Posts

Posted - 2009-02-05 : 11:57:36
Friends,

How do I email a result set of a select statement? select col1, col2, col3 from table where country = 'USA'. (500-600 records will be returned)

As a part of my regular batch process, a store procedure gets triggered. I would like to embed the email functionality either inside the store proc or just create a seperate email store proc and call it from the other store proc.

Thanks,
Raj

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-05 : 12:01:48
use sp_send_dbmail system sp for this

http://msdn.microsoft.com/en-us/library/ms190307.aspx
Go to Top of Page
   

- Advertisement -