@cermank wrote: ...
I tried the following patch
data c;
merge b(in=inb) a;
by acct_id;
if inb;
run;
But the results are not what i expected. The final dataset has almost double the observations than the b dataset. I'm not sure why that might be happening. What am i doing wrong?
The output C will only have more observations than B when one or more values of ACCT_ID appear more than once in A. If you want to keep only one observation per value of ACCT_ID then you can augment your subsetting IF statement to also test for the flag variable FIRST.ACCT_ID that will be generated because of the BY statement.
... View more