I want to merge (using left join) using the id variable in each set and based on var1, var2, var3...etc. (var1-36). However, I don't want to require that they all match. For instance, I want the information to merge whether the only match is a.var2 and b.var7 or if ten match or if they all match. Furthermore, there are missing values for some variables for almost all observations, so I want to ensure that missing matches are not captured. Any help is appreciated. proc sql;
create table want as
select a.*, b.info
from have1 as a left join have2 as b
on a.id = b.id and
(a.var1-36 = b.var1-36)
order by id, date;
quit;
... View more