I have two dataset, I want to do like that: Data 1 ID Y 1 10 2 20 Data 2 ID Y 1 100 1 200 2 300 3 100 4 500 Wanted Data 3 (based on data 1 ID) ID Y 1 10 1 100 1 200 2 20 2 300 I used the code: data data3; merge data1(in=a) data2; by id; if a=1; run; But the y of data 1 with same ID will be overwrite, so how should I create data3? Thank you very much.
... View more