我有一個查詢和蘋果CASE與作用得到錯誤輸入年份在指定範圍內
(full) year must be between -4713 and +9999, and not be 0
此代碼產生錯誤:
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",
to_number(to_char(to_date('1','J')')的用途是什麼? –