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/
|