Link to home
Start Free TrialLog in
Avatar of Scott Palmer
Scott PalmerFlag for United States of America

asked on

Case Statement

I am using PL/SQL (Oracle) and I have a case statement that is dependent upon 1 field, but it drives the results of 2 other fields and possibly 3 fields in another table.  Here is the pseudo code:

case
  when mbr10.ssn is not null then mbr10.ssn as SSN, mbr10.eff_date as Eff_Date, mbr10.end_date as End_Date
  when mbr10.ssn is null and mbr20.ssn is not null then mbr20.ssn as SSN, mbr20.eff_date as Eff_Date, mbr20.end_date as End_Date
end

Can this be done and if yes what is the syntax?

Thanks,
Scott
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Scott Palmer

ASKER

Thanks for your time.

Scott