Date: Thu, 16 Jun 2011 10:30:39 -0400
Reply-To: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Subject: Re: A Data manupulation question
In-Reply-To: A<201106161359.p5GAkjsR016393@willow.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Tom,
proc sql;
create table need as
select *
from have
where subejct not in(select distinct subejct
from have
where signal = 2)
;
quit;
Jack
Jack Clark
Senior Programmer
phone: 410-455-6256
fax: 410-455-6850
jclark@hilltop.umbc.edu
University of Maryland, Baltimore County
Sondheim Hall, 3rd Floor
1000 Hilltop Circle
Baltimore, MD 21250
Please consider the environment before printing this e-mail and/or any attachments.
Confidentiality Notice: This e-mail may contain information that is legally privileged and that is intended only for the use of the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying of this e-mail, distribution, or action taken in reliance on the contents of this e-mail and/or documents attributed to this e-mail is strictly prohibited. If you have received this information in error, please notify the sender immediately by phone and delete this entire e-mail. Thank you.-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Tom
Smith
Sent: Thursday, June 16, 2011 10:00 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: A Data manupulation question
I have a following dataset with two variables subejct (character),
signal
(numeric):
subejct signal
------- ------
1001 1
1001 1
1001 1
1002 1
1002 2
1002 1
1005 1
1005 1
1005 1
Now if any subject has a value for the variable "signal" as 2 then that
subject should be deleted.
The result should be as below:
subejct signal
------- ------
1001 1
1001 1
1001 1
1005 1
1005 1
1005 1
Thank a lot from thebottom of my heart for helping me.