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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.