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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.