Hi all,
I would like to have an answer regarding the following topic. I want to match observations from a two year observations database with a one year observations database on basis of company keys (see below). So, does someone have an answer to match the company keys below for the two year database with the one year database? I know there is a merging command, but it does not work properly.

Regards and thank you for the effort in replying to me.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long Company_Key
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1036
1036
1036
1040
1040
1040
1040
1040
1040
1040
1043
1043
1043
1043
1044
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1045
1048
1048
1048
1048
1048
1048
1048
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1075
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
1078
end
------------------ copy up to and including the previous line ------------------

Listed 100 out of 24128 observations
Use the count() option to list more