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 2008 Forums
 Transact-SQL (2008)
 sql server email

Author  Topic 

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2010-01-28 : 11:37:49
hi friends

i have a table with the follwoing fields

customername items dateofpurchase

john tshirts 01/25/2010

james pants 01/25/2010

I need to send a email to manager based on date having the above information in the body of the email.

i am using sp_send_dbmail.

How can i achieve that sometimes there are two records ,sometimes 3 so..on


Thanks in adavance

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2010-01-28 : 13:49:15
Hi

i have found solution to my problem.

Use @query parameter in the sp_send_dbmail
i could send the results of my query in the body of the email.

Just in case some body else needs it.
Go to Top of Page
   

- Advertisement -