Date: Thu, 31 Jul 2008 14:13:00 -0500
Reply-To: Mary <mlhoward@avalon.net>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary <mlhoward@AVALON.NET>
Subject: Re: wait on-line for answer
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
Here I'm trying to look at whether the min and the max are not equal, but I
had to set missings to another value because missings aren't included in the
min or max functions:
data set1;
input id sum;
if sum=. then sum=-9999;
cards;
001 5
001 .
002 5
002 .
003 5
003 5
;
proc sql;
select id, min(sum) as min, max(sum) as max
from set1
group by id
having calculated min ^= calculated max;
quit;
run;
-Mary
----- Original Message -----
From: SUBSCRIBE SAS-L Anonymous
To: SAS-L@LISTSERV.UGA.EDU
Sent: Thursday, July 31, 2008 2:00 PM
Subject: wait on-line for answer
Hi folks,
I have a dataset looks like:
ID SUM
001 5
001 .
002 5
002 .
003 5
003 5
My question is how to pick ID which has different sum value? The result
looks like:
ID SUM
001 5
001 .
002 5
002 .
Thanks so much for your help!!