I have a query and apple CASE funcation and getting error
(full) year must be between -4713 and +9999, and not be 0
This code is yielding the error:
NVL(
CASE WHEN Ea.ASGACTSTART < add_months(SYSDATE,-12) THEN 365
ELSE
to_number( to_char(to_date('1','J') +
((SYSDATE -1) - Ea.ASGACTSTART), 'J') )
END , 0) "Adujsted Days",