05-07-2014 06:23 PM
Hi, I use proc sql procedure to merge two dataset A and B. I full join these two datasets, but would like to know which observation belongs to which. I want to a new variable to show this information (like variable with value 1 for only from A, 2 for only from B, or 3 for from both A & B).
05-07-2014 07:22 PM
Assuming var1 is in A and var2 is in B
when (A.var1 is not null) then 1
when (B.var2 is not null) then 2
end as source