proc sql;
create table want as select
data2.*
,case when data2.age between data1.age_1 and data1.age_2 then 1 else 0 end as flag
from data1 left join data2
on upcase(data1.name)=upcase(data2.name);
quit;
This code is untested, you need to provide data as working SAS data step code for it to be tested.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: