I want to write a trigger that should execute beginning of the every date based on the server datetime. In that I want to update one table such as follow:
UPDATE STR_IRSHeader SET StatusID = 4
WHERE GETDATE()>ExpiryDate.
How to write a trigger for this?
You don’t need a trigger, but job.
See http://msdn.microsoft.com/en-us/library/ms191439.aspx