starla0316
Programmer
Hello, I am trying to run this sql statement:
-- set echo on
whenever sqlerror exit 1;
set feedback off
set pages 0
--ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY';
--whenever sqlerror exit sql.sqlcode
Begin
-- update table
UPDATE PS_COMBO_BLD_REQ
SET AS_OF_DATE=TO_DATE(TO_CHAR(SYSDATE,'DD/MM/YYYY'), 'DD/MM/YYYY')
--SET AS_OF_DATE=SYSDATE
WHERE RUN_CNTL_ID='COMBO'
;
end;
/
commit;
I am running this sql via an Autosys Job. When I run the job, its status is failed, however, when I check on the table itself, it seems to have worked (the as_of_date is updated to the system date). However when I look at the log file, I am given this error:
Connected.
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01843: not a valid month
ORA-06512: at line 50
Any ideas on how to resolve this?
Thanks in advance
-- set echo on
whenever sqlerror exit 1;
set feedback off
set pages 0
--ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY';
--whenever sqlerror exit sql.sqlcode
Begin
-- update table
UPDATE PS_COMBO_BLD_REQ
SET AS_OF_DATE=TO_DATE(TO_CHAR(SYSDATE,'DD/MM/YYYY'), 'DD/MM/YYYY')
--SET AS_OF_DATE=SYSDATE
WHERE RUN_CNTL_ID='COMBO'
;
end;
/
commit;
I am running this sql via an Autosys Job. When I run the job, its status is failed, however, when I check on the table itself, it seems to have worked (the as_of_date is updated to the system date). However when I look at the log file, I am given this error:
Connected.
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01843: not a valid month
ORA-06512: at line 50
Any ideas on how to resolve this?
Thanks in advance