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)
 sql server email

Author  Topic 

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2010-01-28 : 11:52:45
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

DP978
Constraint Violating Yak Guru

269 Posts

Posted - 2010-01-28 : 12:06:14
Just ensure you distinct the table based on Date of Purchase, you just want to tell someone there is a new order correct? Not what is in each type? (if you need all the things purchased on that day you are going to have to search for creating lists and recursive items.)
Go to Top of Page

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2010-01-29 : 14:12:25
thanks dp for your response but got it solved. Posted the answer in sql server 2008 thread.
Go to Top of Page
   

- Advertisement -