Wednesday, March 17, 2010

NOTE: MERGE statement has more than one data set with repeats of BY values

First, the message reminds the user that it is MANY-to-MANY merge in DATA step.

Most SAS progammers are used to ONE-to-ONE or ONE-to-MANY merge since it is easy to understand. When MANY-to-MANY merge occur, the programmer should pay more attention on the data itself.

To perform MANY-to-MANY merge, there are two popular SAS techniques: DATA step and PROC SQL. It should be noted that PROC SQL do not issue the reminder message in MANY-to-MANY merge. Furthermore, it will create a different dataset with the result of DATA step.

Therefore, I suggest that we should perform merge using DATA step.

No comments: