How to write a trigger that will be executed on a specific date/day of every month/week?
If you have any example, please describe.
![]() |
How to write a trigger that will be executed on a specific date/day of every month/week?
If you have any example, please describe.
Check this out, It explains the whole concept very well >>
Triggers are executed in response to an action on a table (typically but not limited to, add,modify and delete) not an external event like date/time. For example you could setup a trigger so that when you modify a column on table A the trigger would run some sql that would perform another action on table B. If there is a trigger on table B, that trigger could fire off some more SQL, etc...Quote:
Originally Posted by uiyo_90_09
If you need to execute some SQL code at a specific time a trigger is not the way to do it. Write a small application in the language of your choice that will connect to the database and execute the SQL then setup a timer (such as cron) to run that program when you want. It's also a good idea to include logging in the application so you can check the status/success.
HTH.
All times are GMT -7. The time now is 06:23 AM. |