I need help with the below query. I am getting an error message :
ERROR: Error fetching from cursor. ORACLE err
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';