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 2000 Forums
 SQL Server Development (2000)
 monitoring a table in sqlserver

Author  Topic 

Druss
Starting Member

1 Post

Posted - 2005-02-26 : 06:58:35
hi all,
is there any way for sqlserver to monitor a table?
i want to update some records in a table when the time is up.
there is a table with some fields (xID,xState,xDeadLine)
i want to update xState field with 1 value when the "GETDATE() >=xDeadline fields value" like this.

s="UPDATE tableA SET xState=1 WHERE xDeadLine<=" GETDATE()
i want sqlserver to act this query?
i dont wanna write any dll or service cos sql server runs on a hosting firm.
(sqlserver must run the query.)

thanx,

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-02-26 : 07:53:26
The closest you can get is to schedule a job to run periodically. This job would consist of a single step containing the UPDATE statement you provided. The schedule can be once a day, once an hour, once a minute, pretty much any interval you like. You need to contact your host to see if they will set up the job for you.
Go to Top of Page
   

- Advertisement -