Hi, I'm trying to merge 2 sets, but keep them distinct .. better show what I mean:
HAVE
Data1:
CODE | CompanyA |
A | 34 |
C | 23 |
D | 56 |
E | 78 |
F | 45 |
G | 99 |
H | 43 |
Data2
Code | CompanyB |
A | 12 |
B | 65 |
C | 73 |
D | 56 |
E | 17 |
F | 33 |
J | 74 |
This is what I would like it to look:
WANT:
Code | CompanyA | CompanyB |
A | 34 | 12 |
B | 65 | |
C | 23 | 73 |
D | 56 | 56 |
E | 78 | 17 |
F | 45 | 33 |
G | 99 | |
H | 43 | |
J | 74 |
Thank you..
data want ;
merge data1 data2;
by code;
run;
Sometimes you forget the simple ways... I over 'thought' it .. thanks
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.