Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Join tables in SAS

Posted on 2007-11-21
2
Medium Priority
?
4,299 Views
Last Modified: 2013-11-16
I have 2 tables: table 1 one with a list of IDs and table 2 with a smaller list of IDs, which are all also in table 1. I want to merge/join the 2 tables in such a manner that I keep all the IDS in table 1, but not the IDS that are in both table 1 and 2. What kind of join do I need to do?
0
Comment
Question by:migiurgiu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 1

Expert Comment

by:wolfen351
ID: 20332946
proc sql;
  create table3 as
  select * from table1 where id not in (select id from table2) Data
quit;
0
 
LVL 1

Accepted Solution

by:
wolfen351 earned 200 total points
ID: 20332954
data table3;
  merge table1(in=a) table2(in=b);
  by id;
  if a and not b;
quit;
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question