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)
 Automatic firing a query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-03-07 : 08:41:41
Jaiprakash writes "I have two column expiry date (EXPDATE) and Status (STATUS) in a table called membertable.I want to update the status column to 'expired' when the current date date equal expiry date automatically through sql server and also send a mail through sql server to that specific member. How can i achieve this. Please provide me with a solution..

Regards,
Jaiprakash"

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-07 : 09:31:11
create a stored procedure to do this and schedule it to run daily


KH

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-03-07 : 09:38:48
at 00:00:01

Do you know what a job is?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-03-07 : 09:39:44
Also, that could be a lot of emails..unless of course you do a set based report




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -