Click to See Complete Forum and Search --> : automatic update of status when a specific date is reached


noob06
07-08-2006, 11:46 AM
i have a Class table which has the following fields, className, closingDate, status (open or closed).

How can I have an automatic function in MSSQL which will update the status automatically when the current date is past the closingDate? E.g. if the closing date is 6th June 2006, the status should be updated to Closed when the current date reaches 7th June 2006.

I read through triggers, but they seem to be triggered only when inserting, deleting and updating. pls advise. thanks

chazzy
07-08-2006, 09:25 PM
sql server should have something like a "job" - a scheduled job that can run to do things like this.