LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 1999, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 22 Dec 1999 20:57:23 GMT
Reply-To:   diltilia@MY-DEJA.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   diltilia@MY-DEJA.COM
Organization:   Deja.com - Before you buy.
Subject:   Re: records compare

Kathy,

Suppose you have a key (e.g. ID) in both tables, you can do this:

proc sql; select * from tbl2 where id not in (select id from tbl1); quit;

If it returns "No Rows Selected", all the records(IDs to be exeact) in tbl2 are in tbl1, otherwise the IDs that are in tbl2 but not in tbl1 will be listed.

-Diltilia

In article <19991222152618.67179.qmail@hotmail.com>, Kathy White <kathyzhi@HOTMAIL.COM> wrote: > There are two tables, tbl1 and tbl2. how can I check if all records in > tbl2 exist in tbl1? Thanks in advance for any suggestion. > > Kathy > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com >

Sent via Deja.com http://www.deja.com/ Before you buy.


Back to: Top of message | Previous page | Main SAS-L page