Error:
BEGIN
*
ERROR at line 1:
ORA-23319: parameter value "01-JUL-17" is not appropriate
ORA-06512: at "SYS.DBMS_JOB", line 60
ORA-06512: at "SYS.DBMS_JOB", line 238
ORA-06512: at "SYS.DBMS_JOB", line 194
ORA-06512: at line 2
4th parameter is interval. 3rd parameter is next_date.
If you wanted next_date, then it does require a date not a string so it is the previous example I posted:
trunc(NEXT_DAY(ADD_MONTHS(TRUNC(SYSDATE , 'Q'),3)-1,'SATURDAY'))+(06/24)+(00/1440)
interval
Date function; evaluated immediately before the job starts running.
Sid Khanna
ASKER
Hi,
We want this to run on 1st of every quarter even if 1st falls on a Saturday. the next date it should run is on 1st July 2017 which falls on a Saturday and then every quarter after that.
I have manually hard coded next date, but I want this to run the run quarter. I would like it to run on October 1st and next quarter without hard coding the date.
Your help & guidance is appreciated.
slightwv (䄆 Netminder)
I think this is what you need:
trunc(ADD_MONTHS(TRUNC(SYSDATE , 'Q'),3))
I haven't changed anything from my end for the time to show 6am. I am pasting my latest execute statement and the select statement and time is showing 00:00:00
For example you could set: BYMONTH=JAN,APR,JUL,OCT