title: In ORACLE get values from 01-01-YYYY to 12-31-YYYY previous year
body: <p>In ORACLE I am trying to get values from <code>PS_EMP_REVIEW_GOAL</code> with a <code>REVIEW_DT</code> between <strong>01-01-YYYY</strong> and <strong>12-31-YYYY</strong> from last year.   </p>
  
  <p>I get the following error msg:</p>
  
  <pre><code>ORA-01843: not a valid month
  01843. 00000 -  "not a valid month"
  </code></pre>
  
  <p>*Cause:    </p>
  
  <p>*Action:</p>
  
  <pre><code>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 
  );
  </code></pre>