Scott Palmer
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Scott