I am using proc sql to combine datasets. What is the theoretical difference (if any) in using these two codes with respect to the patient IDs kept? Do they both only keep the patient IDs from the first dataset and match to the identical patient IDs in the second? The goal of both is to use the a dataset and then only obtain the files with the same patient ID showing up in b. proc sql; create table mart_TS.missmedical as select a.patid, a.index_dt, a.preg_dt, b.* from mart_TS.outcomemiss a, dbname.clinical(keep=patid eventdate medcode) b where a.patid=b.patid order by a.patid, b.medcode; quit; proc sql; create table mart_TS.outcomemiss as select * from mart_tmp.ptlist3bdedup where patid not in (select distinct patid from mart_tmp.ptlist4bdedup); quit; Thanks!!!
... View more