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 (February 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 19 Feb 2004 09:46:35 -0500
Reply-To:     "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Subject:      Re: Comparing/Deleting common records in 2 datasets

"Sun Bow" <sunbow4u@HOTMAIL.COM> wrote in message news:BAY2-DAV46YrVjYKtWf0000082d@hotmail.com... Hi All,

I wish to compare dataset a with dataset b by one var (id) and if the id is common, then delete the record in dataset a. ...

proc sql;

delete from a where id in (select id from b); or create table desiredoutput as select * from a where id not in (select id from b);

-- Richard A. DeVenezia http://www.devenezia.com/downloads/sas/samples/


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