New SAS User

Completely new to SAS or trying something new with SAS? Post here for help getting started.
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sassy_seb
Quartz | Level 8

Hello everyone, I had a question. How can I go about merging multiple datasets, but only IDs that are found in each dataset? Like if ID #1 is found in A, B, and C, and ID #2 is only found in A, the merged dataset should only return ID#1. 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

data want;

     merge a(in=in1) b(in=in2) c(in=in3);

     by id;

     if in1 and in2 and in3;

run; 

--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26

data want;

     merge a(in=in1) b(in=in2) c(in=in3);

     by id;

     if in1 and in2 and in3;

run; 

--
Paige Miller

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 427 views
  • 1 like
  • 2 in conversation