Date: Thu, 21 Feb 2008 13:24:51 -0500
Reply-To: Bob_Abelson@HGSI.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Bob_Abelson@HGSI.COM
Subject: Re: Which ID has multiple records?
In-Reply-To: <98814.14095.qm@web51607.mail.re2.yahoo.com>
Content-Type: text/plain; charset=us-ascii
Here's a PROC SQL solution:
proc sql;
select id
from a
group by id
having count(*)=1;
quit;
Bob Abelson
HGSI
240 314 4400 x1374
bob_abelson@hgsi.com
"Irin later" <irinfigvam@YAHOO.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
02/21/2008 01:08 PM
Please respond to
"Irin later" <irinfigvam@YAHOO.COM>
To
SAS-L@LISTSERV.UGA.EDU
cc
Subject
Which ID has multiple records?
I have two columns: ID and subID
I need to know which ID does not have multiple subIDs. How can I do it?
Id subid
400b2 400a1
400b2 400a2
400b2 400a3
400b1 400c1
400b4 400d4
400b4 400d5
400b0 400d2
ID= 400b2 has multiple subid
ID=400b1 has only subid
ID=400b0 has only subid
Thank you in advance
Irin
---------------------------------
Never miss a thing. Make Yahoo your homepage.