Many-to-many merging

In the one-to-many merge illustration, we had multiple observations for the same BY group in dataset C. In a many-to-many merge situation, we can end up with multiple observations for the same BY group in different datasets. Let's use the same program we used in the one-to-many merging but with slightly modified datasets:

The merged output is as follows:

The merge was performed successfully as per the LOG. However, the output is incorrect in many ways. The following are a few lines of the LOG:

NOTE: MERGE statement has ...

Get Hands-On SAS for Data Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.