Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SQL Server Triggers

Options
  • 28-09-2007 11:01am
    #1
    Registered Users Posts: 500 ✭✭✭


    Folks,

    I want to set up a trigger that will fire automatically every year - lets say on 1st of jan.
    How would i do this?


Comments

  • Registered Users Posts: 23,212 ✭✭✭✭Tom Dunne


    warrenaldo wrote:
    Folks,

    I want to set up a trigger that will fire automatically every year - lets say on 1st of jan.
    How would i do this?

    I don't think you want a trigger for what you want to do. Is it related to the post yesterday about archiving on a certain date?

    If so, it's a scheduled job you want, not a trigger. A trigger is fired upon an event, such as an insert or an update. If you wanted a trigger to fire at 00:01am on 1st of Jan, somebody or something would have to do something to fire the trigger.

    A scheduled job on the other hand, will start at a specified time/date.


  • Registered Users Posts: 500 ✭✭✭warrenaldo


    Maybe thats where i am going wrong. All i could find was triggers based on delete, on insert etc etc.
    Ill start looking for scheduled jobs then.
    thanks.
    yes its related.


Advertisement