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 |
anilkumar.forum
Starting Member
5 Posts |
Posted - 2009-05-30 : 01:20:58
|
Hi Everyone,I have a table with 4 columns. One of the column is time interval which stores the date and time. My requirement is the moment system time reaches one of the rowns of time interval,a trigger should raise automatically. How can i achieve this??With Best RegardsAnil Kumar |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2009-05-30 : 02:23:36
|
It sounds like you should be doing this in a client app, but you could do it in SQL code. Select the first date/time that is after the current date and time and store the value in a variable then issue a WAITFOR TIME statement using the variable. The code will sit waiting until the time comes. |
 |
|
SQLRatankalwa
Starting Member
42 Posts |
Posted - 2009-06-02 : 03:11:23
|
If you do not want to do it using the app. You can start a SQL Server Agent Job which runs every 1 minute or you can set the duration and execute a stored procedure which actually does the required update.Ratan KalwaSQL Server Professionals User Grouphttp://www.revalsys.com |
 |
|
|
|
|