title: ORA-00907: missing right parenthesis
body: <pre><code>SELECT DISTINCT( EMP.EMPLOYEEID ),
      EMP.EMPLOYEECODE,
      EMP.EMPLOYEENAME,
      EMP.HOMEADDRESS,
      DESIG.DESIGNATIONNAME
    FROM HRM_EMPLOYEE EMP,
      COM_DESIGNATION DESIG,
      COM_DEPARTMENT DEPT,
      COM_COMPANY COMP,
      HRM_EMPLOYEEDEPARTMENTS EMPDEPT,
      USR_USERS USRS
    WHERE EMP.EMPLOYEEID = EMPDEPT.EMPLOYEEID AND
      EMP.DESIGNATIONID  = DESIG.DESIGNATIONID AND
      DESIG.DEPARTMENTID = EMPDEPT.DEPARTMENTID AND
      EMP.STATUS IN  (SELECT  STAT STAT
          FROM
            (
            CASE
            When (:status = 0) THEN
              SELECT   1 STAT FROM dual
              UNION ALL
              SELECT   2 STAT FROM dual
            else
              Select :status STAT from dual
            end
            )
            xx
         ) 
  </code></pre>
  
  <p>Actually my need is: stow the records according to the parameter passing. if tat parameter i wish to show all records.</p>