Open ManytoMany left.dta | Open ManytoMany right.dta |
The “merge” command does not produce the correct results for a many to many merge.
Merge using the “joinby” command.
* Import the left dataset, referred to as the “master” dataset
use "ManytoMany left", replace
* Merge the right dataset, referred to as the “using” dataset on the unique identifier Key
joinby Key using "ManytoMany right.dta", unmatched(both)
Functions referenced:
--- The End ---