Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email from SQL server - Automatic 1

Status
Not open for further replies.

rajkum

Programmer
Jul 30, 2003
48
US
Hi,
I have a requirement where i have to look up the data for expiry dates and if a certain product is due to expire in 1 month the system has to shoot out an email with the details of the product.
Is there anyway I can do it in SQL server?
Thanks,
Raj
 
Yes, write a stored proc that checks for the condition and use sqlmail (see xp_sendmail) to send the email when it occurs. Then schedule a job to run the proc. Depending on how often you want to run this you may need to set some sort of flag in the database so you don't notify them about the same thing over and over again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top