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.
Author |
Topic |
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2009-06-08 : 12:30:57
|
Hi ,i have two tables customer and customerdetails.The customer table has customerid,customername,customeremailthe customer details table have customerid,customermailingaddress,customerdate(date when the details was entered)i want to design a job on the backend that would scan the customerdate and if the date < 6 months from getdate, I want to send an email to the customer based on the customeremail field in the customer table asking him if he has new new updates.Can I do this on Sql server?Thank you. |
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2009-06-08 : 14:27:01
|
yes you can...Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2009-06-08 : 17:12:31
|
dinakar,can you show me the way? |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2009-06-08 : 17:59:10
|
you can write a stored proc that scans the table and does the datediff and inserts the customers who fall into the category into a temp table.. and then send emails to all of them.. and may be update the status back to the original table.. get this part working first.. then you can just schedule a job and call this proc.Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
|
|
|