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
 General SQL Server Forums
 New to SQL Server Programming
 TIME ELAPSED TRIGGER

Author  Topic 

cipi20052000
Starting Member

5 Posts

Posted - 2009-12-09 : 18:04:37
Hi! Here's my problem.. I have a table in my database called Player which contains a column called Energy. The level of energy is first 100. I have an ASP.NET application witch modifies the level of energy (it decreases by 10 points each time I press a button). I want to create a trigger that when the time is 1:00, 2:00, 3:00 and so on, I want to increase the level of energy by 10 points for example (if the level of energy in bellow 100 points). Now I've read a few things and I realized that I have to create a trigger-based auditing or something like that. Can anyone help me please because I have no idea how to do this? (I'm using SQL SERVER 2008)

monty

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-09 : 18:46:46
Triggers fire for DML operations (INSERT/UPDATE/DELETE). In order to call something on a scheduled basis, you'd instead create a SQL Agent job.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -