title: Oracle SQL Previous Month query issue
body: <p>So far I've got the following:</p>
  
  <pre><code>SELECT TO_CHAR("HOL_DEPART_DATES"."DEPART_DATE", 'MM') as "Depart_Month",
         TO_CHAR(sysdate, 'mm')-1 as "Current_Month"
    FROM "HOL_DEPART_DATES" "HOL_DEPART_DATES"
   WHERE "Depart_Month" = "Current_Month"
  </code></pre>
  
  <p>However this gives me an error: </p>
  
  <blockquote>
    <p>ORA-00904: "Current_Month": invalid identifier</p>
  </blockquote>
  
  <p>However without the WHERE clause, it works fine.  Any ideas?</p>