Reputation:
I need help with the below query. I am getting an error message :
ERROR: Error fetching from cursor. ORACLE error is ORA-01840: input value not long enough for date format.
What input value is this referring to not being in date format? I can't figure this out. I do see where it refers to AND Removed>= TO_DATE('08162011', 'MMDDYYYY')
.
Removed
Upvotes: 0
Views: 2861
Reputation: 65393
Probably you have a value like TO_DATE('0816', 'MMDDYYYY')
for
TR_EFF_DT
input, and that does not fit with respect to the date
format, as in the following statement :
with tab(TR_EFF_DT) as
(
select TO_DATE('0816', 'MMDDYYYY') from dual
)
select *
from tab
where TR_EFF_DT>= TO_DATE('08162011', 'MMDDYYYY');
Error:
ORA-01861: literal does not match format string
OR you probably have a mismatch for your DB server's Date Format with your current session's Date Format. In this case you may issue :
ALTER SESSION SET nls_date_format='MMDDYYYY';
Upvotes: 1