In ORACLE I am trying to get values from PS_EMP_REVIEW_GOAL
with a REVIEW_DT
between 01-01-YYYY and 12-31-YYYY from last year.
I get the following error msg:
ORA-01843: not a valid month
01843. 00000 - "not a valid month"
*Cause:
*Action:
SELECT
ERG.REVIEW_DT,
ERG.CAREER_GOAL
from PS_EMP_REVIEW_GOAL ERG, PS_PERSONNEL P
where ERG.EMPLID = P.EMPLID
and ERG.REVIEW_DT = (Select max(ERG1.REVIEW_DT) from PS_EMP_REVIEW_GOAL ERG1
where ERG1.EMPLID = ERG.EMPLID
and ERG1.REVIEW_DT BETWEEN to_date('01-01-' || trunc(sysdate, 'YYYY'))-1
AND to_date('12-31-' || trunc(sysdate, 'YYYY'))-1
);