SQL CASE Expression, ELSE run "ALL"
Posted on 2007-10-02
I am using the following case expression in an Oracble/PeopleSoft database:
WHEN 'bbbbb' THEN B. DEPTID in ('50000','11100','22200','333300)
WHEN 'aaaaa' THEN B. DEPTID in ('41111', 77700, "99900)
How would I change the else to ELSE run all departments. (:1 is a prompt that indicates a userID). When the UserId is not either 'aaaaa' or 'bbbbb', I need the query to run all departments Note: without the CASE expression, the query runs all departments.