Triggers
-
Hi guys, I would like to create a trigger that must execute at a certain time.e.g. '2010-06-08 12:00:00' I know there are stuff such as insert, update, and delete triggers. But is there a way that i can set a time when that trigger should fire....other than using sql jobs Please anyone help me. Thanks, Morgs
-
Hi guys, I would like to create a trigger that must execute at a certain time.e.g. '2010-06-08 12:00:00' I know there are stuff such as insert, update, and delete triggers. But is there a way that i can set a time when that trigger should fire....other than using sql jobs Please anyone help me. Thanks, Morgs
MorgSim wrote:
But is there a way that i can set a time when that trigger should fire
Not as far as I know. A trigger, by definition, is activated by an event, how are you going to activate the trigger if you don't use a job. You are trying to use the wrong tool for the wrong job. Just use a procedure and call it using a job like it is designed to!
Never underestimate the power of human stupidity RAH
-
Hi guys, I would like to create a trigger that must execute at a certain time.e.g. '2010-06-08 12:00:00' I know there are stuff such as insert, update, and delete triggers. But is there a way that i can set a time when that trigger should fire....other than using sql jobs Please anyone help me. Thanks, Morgs
-
MorgSim wrote:
But is there a way that i can set a time when that trigger should fire
Not as far as I know. A trigger, by definition, is activated by an event, how are you going to activate the trigger if you don't use a job. You are trying to use the wrong tool for the wrong job. Just use a procedure and call it using a job like it is designed to!
Never underestimate the power of human stupidity RAH
Ok thanks guys, i was also actually not sure about this. i will try some other logic instead
-
Hi guys, I would like to create a trigger that must execute at a certain time.e.g. '2010-06-08 12:00:00' I know there are stuff such as insert, update, and delete triggers. But is there a way that i can set a time when that trigger should fire....other than using sql jobs Please anyone help me. Thanks, Morgs
If you don't want to use a SQL job, use a scheduled task instead; it is executed outside of the control of the SQLServer Agent Service. Not necessarily pretty, but provides a different level of control. Tim