I have a main procedure called SP_MAIN, which will call the below procedures for execution everyday.
SP_ACCT
SP_CONSOLE
SP_CUST
SP_RATE
SP_BAL
SP_PRO
SP_CDT
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?
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.
Bookmarks