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)
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?