i'm doing the equivalent of a left join in SAS on approximately 32 million rows. The output contains 7 additional rows compared to the original. I looked at the USSGL and there seems to be no pattern as to why it generated addtional rows. Any thoughts?
My code:
DATA WORK.TEST;
MERGE FL_AUG (IN=A) XWALK (IN=B KEEP=USSGL DR_CR_IND);
BY USSGL;
IF (A) THEN OUTPUT;
RUN;
Have you checked the XWALK data to see if it contains multiple entries for the same USSGL? That's the most likely culprit.
If USSGL identifies unique observations in FL_AUG then
IF A and first.USSGL then output;
should solve the problem.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.