Ask Experts Questions for FREE Help !
Ask
    uiyo_90_09's Avatar
    uiyo_90_09 Posts: 5, Reputation: 1
    New Member
     
    #1

    Sep 24, 2007, 02:45 AM
    Database date event trigger
    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.
    benn11's Avatar
    benn11 Posts: 1,036, Reputation: 43
    Ultra Member
     
    #2

    Sep 24, 2007, 06:22 AM
    Check this out, It explains the whole concept very well >>
    jstrike's Avatar
    jstrike Posts: 418, Reputation: 44
    Full Member
     
    #3

    Oct 4, 2007, 07:08 AM
    Quote Originally Posted by uiyo_90_09
    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.
    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...

    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.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Trigger Injections [ 1 Answers ]

I just found out from my MRI that I have protrusions in my C5 and C6 from a past wreck I had 5 years ago. I had Whiplash pretty bad - but went through tons of therapy for 6 months. But, guess it was never better and has worsen over time. My doctor wants me to go to pain management now. What can...

To-date total based on current date [ 1 Answers ]

:confused: I am trying to create a forumula that will give a cumulative or "to-date" total that will exclude future months from the total. i.e. ithe point in time is August and I need to show a to-date number Through August only even though September and October are included in The...

Special Event [ 1 Answers ]

I have a very important event coming up on April 29th of this year. I would like to lose twenty pounds by that time. I don't think that's too much weight to lose in this time, but it seems so hard to lose weight. Does anybody have any ideas on how I can lose 20 lbs in 2 1/2 months?

F-1 to H-1, what's the start date of H-1? Should be approval date or visa issue day? [ 3 Answers ]

As I mention before, I changed from F-1 to H-1 last year. I got my H-1 status in Feb 2004, but I went to my home country to get the H-1 visa stamp in August 2004. So I would like to know for counting my H-1 status, is it the date that USCIS (the Immigration) approved (which is Feb 1st), or the...


View more questions Search