Hi, dear all,
I want to merge two datasets by using proc sql.
dataset A dataset B
id code price id ved price
1 a 15 1 af 15
1 f 13 2 cd 13
2 b 11 3 ed 8
2 a 13 4 ff 13
3 c 10 5 gs 15
4 d 10
4 b 13
I want to merge those two datasets on two variables id and price.
The expected result is
merged table
id price code ved
1 15 a af
2 13 a cd
4 13 b ff
I want to keep all the rest information in both datasets.
Thank you so much
Best,
Yanting
Thank you !!!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.