Link to home
Start Free TrialLog in
Avatar of LuckyLucks
LuckyLucks

asked on

Coalesce and case in left join

Hi EEE:
  I have a problem where I am creating a target column based on values of table T. In pseudo code this looks like:
If T.col1 = US , CAN then Local
Else coalesce(A.col1, B.col1)
Else null
from T left join A left join B on T.id=A.id and T.id=B.id

Can you please help me create a PROC SQL that accomplishes this?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Aloysius Low
Aloysius Low
Flag of Singapore image

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