Solved

Join tables in SAS

Posted on 2007-11-21
2
4,296 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 50 total points
ID: 20332954
data table3;
  merge table1(in=a) table2(in=b);
  by id;
  if a and not b;
quit;
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

734 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