Dear Statalisters:

I have the following file #1:

clear
input byte(firmid ownerid) float own byte level
1 4 10 1
1 3 53.8 1
2 5 100 2
3 6 50 2
3 7 50 2
6 8 20 3
8 9 20 4
end

that I need to merge with fie #2:

clear
input byte(ownerid ownerid2) float own2 byte level2
1 4 10 1
1 3 53.8 1
2 5 100 2
3 6 50 2
3 7 50 2
6 8 20 3
8 9 20 4
end

using the variable "ownerid"

the "ownerid" variable can appear more than once both in the master and using data files. Considering prior posts saying that it is not a good idea to use the merge m:m command, I am wondering on how to merge these to files that have an "m:m" structure, but without using the merge m:m.

thank you all for your help and stay safe,

LR