Date: Thu, 23 Feb 2006 08:15:44 -0500
Reply-To: Eric Hoogenboom <erichoogenboom@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Eric Hoogenboom <erichoogenboom@YAHOO.COM>
Subject: Re: proc sql: count into macro variable including zeros
Hmm, I guess I was drifting a little myself.
Here is the corrected SQL and a test dataset:
data ds2;
input v1 1 v2 3;
datalines;
1 1
1 2
2
1 2
3
2 4
run;
proc sql;
select distinct v2
from ds2
where v1 = .
and not v2 in (select distinct v2
from ds2
where v1 NE .);
quit;
Eric
|