*Copyright @ www.mycsg.in;


One-to-many merges in SAS

What is a one-to-many merge

Create sample datasets

Sort both datasets before merging

Perform the one-to-many merge

Basic merge - combine subjects with visits

Keep only rows that exist in both datasets

What happens when both datasets have repeated BY key values

Sequential pairing - not a cartesian product

Safe approach - verify one-to-many assumption before merging

Key points to remember