Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01841: (full) year must be between -4713 and +9999, and not be 0 error.

831929Apr 12 2011 — edited Apr 12 2011
I am getting this error when am executing the beow sql statement:

ORA-01841: (full) year must be between -4713 and +9999, and not be 0 error..


SELECT A.KEY1, A.KEY2, A.NAME, A.KEY3, A.KEY4, TO_CHAR(A.AUDIT_STAMP,'YYYY-MM-DD-HH24.MI.SS."000000"'), A.AUDIT_ACTN, A.FIELDNAME, A.OLDVALUE, A.NEWVALUE, A.PAID, A.DEPTID, A.DEPTNAME, TO_CHAR(SYSDATE,'YYYY-MM-DD')
FROM PS_Q_AVT_AUDIT_VW A
WHERE A.REG_REGION IN (SELECT B.SETCNTRLVALUE
FROM PS_SET_CNTRL_REC B
WHERE B.REC_GROUP_ID = 'HR_07'
AND B.RECNAME = 'ABS_TYPE_TBL'
AND B.SETID LIKE 'CZE01')
AND TO_DATE( A.KEY3,'YYYY-MM-DD') < TO_DATE('2011-02-21','YYYY-MM-DD')
AND trunc( A.AUDIT_STAMP) BETWEEN TO_DATE('2011-02-21','YYYY-MM-DD') AND TO_DATE('2011-02-28','YYYY-MM-DD')
ORDER BY 1, 2, 6 DESC

Please can anyone have a look and help me resove this please.

Thanks in advance,
Sridhar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2011
Added on Apr 12 2011
8 comments
445 views