Dear All,
i hope someone can help me:
I have two datasets that I would like to connect to each other.
In dataset A there are AEs listed and in the variable AECMNO the corresponding CMs (2, 3, 26, 27, 28, 29, 30, 31, 32,33,34).
In dataset B, these CMs should be found in the variable CMSPID.
I have tried the following statement. unfortunately a: not all hits are listed and b. 1 wrong hit is listed.
proc sql;
create table AE_CM
as select * from test_AE as A left join cm as B on A.SubjectId=B.SubjectId where (AECMNO contains CMSPID);
quit;
thank you for your help
Thank you very much it works really precisely.
best
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.