I am trying to merge two data sets with a lot of the same observations except one has a column more.
Dataset1 contains data for 20% of the observations and Dataset2 contains observations for the other 80% (+ one column extra). If i run the code below, I get 4037 observations when i merge the two datasets with 315 observation!
create table RateExposure as
from Dataset1, Dataset2
where Dataset1.ID = Dataset2.ID
order by Dataset1.ID;
If I run
merge Dataset1 Dataset2;
I only get observation for one of the datasets - how can this be?
PROC SQL; CREATE TABLE result AS SELECT t1.*, t2.extra_column FROM Dataset1 AS t1 INNER JOIN Dataset2 AS t2 ON (t1.ID = t2.ID) ; QUIT;