BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
hjjijkkl
Pyrite | Level 9

I have three different datasets and I am trying to find same ID from the three datasets. I have used proc compare but, when using proc compare, you can only compare two datasets at a time. I was wondering if there is another way to compare the three data at the same time?

1 ACCEPTED SOLUTION
6 REPLIES 6
hjjijkkl
Pyrite | Level 9
Thank you! it worked. What if we want to compare more than one variable? For example, ID and start date? How would you modify the above code ?
Kurt_Bremser
Super User

Expand the where condition, if you need to check for combinations of id and date.

If you only need to check the date itself, run a separate select similar to the one for id.

hjjijkkl
Pyrite | Level 9
What if we want to compare more than one variable? For example, ID and start date? How would you modify the above code ?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 6 replies
  • 1005 views
  • 1 like
  • 2 in conversation