how to run procedure based on day
I have a main procedure called SP_MAIN, which will call the below procedures for execution everyday.
I need only execute SP_RATE on every Tuesday on third week of the month.
How to execute a procedure based on a specific day?
All these procedure has dependencies, I can't take out SP_RATE from SP_MAIN as a standalone procedure. How could I include a function within the SP_MAIN to have SP_RATE only run on every Tuesday on third week of the month?
Appreciate any suggestion given.
Use TRUNC(sysdate,'MM')-1 to find the last day of the previous month. Use NEXT_DAY() to find the first Tuesday. Add 14 to find the third Tuesday. Compare with Trunc(sysdate) to see if today is the third Tuesday.
Click Here to Expand Forum to Full Width