I'm combining 2 files by an ID variable. Each of the input files has approximately 5000 records, and none of them have missing data for the ID variable. The output file has about 7400 records, about 800 of which have missing data for the ID variable. How can that be?
Proc SQL; Create Table &state..&state.&year._IMG8_matched_DX_IMAGED as Select a.MSIS_ID, a.DX, b.MSIS_ID, b.IMGPROC, a.SRVC_BGN_DT, b.SRVC_BGN_DT, a.SRVC_BGN_DT as DxDatenum, b.SRVC_BGN_DT as IMGDatenum from &state..ipot&year._&state._IMGmeas8_DX as a RIGHT JOIN &state..ipot&year._&state._IMGmeas8_IMAGED as b ON a.MSIS_ID = b.MSIS_ID; quit;
... View more