I have the following statement in my Select section of my program:
WHEN work_day_flag = 'Y' AND DATEDIFF('day', tranc(a.ACTUAL_DATE), nest1.LAST_WORK_DAY_IN_MONTH) < 7
THEN (7- DATEDIFF('day', trunc(a.ACTUAL_DATE), b.LAST_WORK_DAY_IN_MONTH)) / 5
) AS ENDMNTHWRKDAYSWGTD,
I am getting ORA-00904: "DATEDIFF": invalid identifier error- Can you please help me solving this issue?
Thank you - Gabe