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.