PL/SQL Using CASE in WHERE clause
<p>Good day Stackoverflow!</p>

<p>I have a query that is giving me an error: "<strong>Missing Right Parenthesis</strong>", at least, so says SQL Developer. </p>

<p>My query has a CASE statement within the WHERE clause that takes a parameter, and then executing a condition based on the value entered.</p>

<p>I've read that when using a CASE statement within a WHERE clause you have to surround the statement with parenthesis and assign it to a numeric value, e.g. "1", however doing so does not accomplish my goal.</p>

<p>My goal is to execute a condition in the CASE statement if that condition is met.</p>

<p>Would you mind taking a look and giving me some input please?</p>

<p>Thanks!</p>

<pre><code> SELECT ...
    FROM ....
    WHERE 1 = 1
    AND (
           CASE :P_REPORT_PERIOD
                WHEN 'SPRING' 
                  THEN ((fiscal_year = (EXTRACT(YEAR FROM (SYSDATE))-1) AND period &gt;=10) OR (fiscal_year = (EXTRACT(YEAR FROM (SYSDATE))) AND period &lt; 4))
                WHEN 'FALL'   
                  THEN ((fiscal_year = (EXTRACT(YEAR FROM (SYSDATE))) AND period &gt;=4) OR (fiscal_year = (EXTRACT(YEAR FROM (SYSDATE))) AND period &lt; 10))
           END
    ) = 1
</code></pre>