05-16-2012 06:46 PM
I have a simple merging question that should be an easy answer, but I can not figure it out. Here is the data. Thanks.
merge dataset1 (in=a) dataset2 (in=b);
Why does ID = 2 not have "Yes" replace the blanks in Var1 for both records?
05-16-2012 07:48 PM
Because only one record with a YES was provided from the second dataset. So on the second observation for ID=2 only dataset1 is contributing a value.
Many to One merges like this only work when the non-key variables do not overlap.