Hi everyone. I have two dataset that need to be merged: The first dataset contains around 39k observations, which are acquistion activities taken by U.S firms. The dataset contains the firms' unique ID (called PERMNO), and the date on which the acquisitions were completed. I want to merge this dataset with the second dataset, which contains PERMNO and each firm's quarterly accounting data (eg total asset) over a period of time. I format the date of both dataset as yyq. (ie. year and quarter), then sort them by PERMNO and date. I then merge by PERMNO and date using proc sql, the code is as follows: proc sql; create table want as select dataset1.*,dataset2.* from dataset1 left join dataset2 on dataset1.PERMNO=dataset2.LPERMNO and dataset1.date=dataset2.datadate; quit; However the merged table has a significant amount of observations missing, which should not be the case according to the two original datasets. Have I missed something? Thanks
... View more