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

hemant_kMay 26 2021

hi
i am trying below code and getting an error

CASE 
WHEN amlrating=1 THEN add_months(to_date(to_char(xdt,'dd-mon-yyyy'),'dd-mon-yyyy'),120)
WHEN amlrating=2 THEN add_months(to_date(to_char(xdt,'dd-mon-yyyy'),'dd-mon-yyyy'),96)
WHEN amlrating=3 THEN add_months(to_date(to_char(xdt,'dd-mon-yyyy'),'dd-mon-yyyy'),24)
END duedt

i am processing about 1.5 million records
while computing xdt i did not encounter any error
how do I find record throwing this error?

Comments
Post Details
Added on May 26 2021
8 comments
14,965 views