Hi, I am trying to match merge two large data sets having nine common variables (v1-v9) with 11 variables in total (random values put in as example): -------------------------------------------------- Dataset1: v1 v2 v3 v4 v5 v6 v7 v8 v9 v_a v_b 1 10 1 24 5 12 15 21 3 11 12 1 15 1 27 9 13 17 21 1 11 12 -------------------------------------------------- Dataset2: v1 v2 v3 v4 v5 v6 v7 v8 v9 v_c v_d a 10 1 24 5 12 15 21 3 11 12 a 15 1 27 9 13 17 21 1 11 12 -------------------------------------------------- After merging, I would like my output in the format below: Merged_Dataset: v1 v2 v3 v4 v5 v6 v7 v8 v9 v_a v_b v_c v_d ------------------------------------------------------- Could you please help?, the code I used is as below: data Merged_Dataset;
merge Dataset1
Dataset2 (in = in2);
by v1 v2 v3 v4 v5 v6 v7 v8 v9 ;
if in2;
run; I would like to see if there are any duplicates in the observations that have common values for the 9 variables that are of interest. But I am not sure how to do this after matching. Any valuable feedback would be appreciated. Thanks!
... View more