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!

getting error :ORA-01861: literal does not match format string

user12953417Oct 9 2014 — edited Oct 9 2014

Hi ,

Here is my code below :

select * from ccx.comm

WHERE COMMDATE IN

(

SELECT case

when to_char(sysdate, 'MM') >= 7

then to_char(sysdate, 'YYYY')

else to_char(add_months(sysdate,-12), 'YYYY')

end yearvalue FROM dual

)

My NLS_Date_format is : mm/dd/yyyy

Even tried with to_date before to_char , getting the same error :   ORA-01861: literal does not match format string.

Please suggest.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2014
Added on Oct 9 2014
4 comments
356 views