BookmarkSubscribeRSS Feed
Ted
Calcite | Level 5 Ted
Calcite | Level 5
I have 2 datasets with the same variables and I want to see which observations are in data1 and not in data2.
Is there a point and click way of getting the data from data1 which is only in data1 and not in data2. I can code this but some of our future users will not be coders so will need to know how to do it.
Thanks
1 REPLY 1
ChrisHemedinger
Community Manager
Ted,

You can do this with the query builder in EG.

1. Add both tables to the query builder. (Let's call them TABLE1 and TABLE2). Add the desired columns to the "select" list.

2. In the Join window, make sure that the tables are joined on the key column you want. (Ex: TABLE1.column and TABLE2.column)

3. Modify the Join type to Outer Join (last selection in the list of join types)

That specifies that you want all rows from both tables to be considered for the result set. Now you want to create a filter so that you get only those rows with a value in the first table and NOT in the second table. So...

4. Create a filter: where TABLE2.column IS NULL ("IS NULL" is a selection in the filter operator list)

That should get you what you want.

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 699 views
  • 0 likes
  • 2 in conversation