|Date: ||Wed, 22 Nov 2006 22:04:28 -0800|
|Reply-To: ||David L Cassell <davidlcassell@MSN.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||David L Cassell <davidlcassell@MSN.COM>|
|Subject: ||Re: One more SQL question|
|Content-Type: ||text/plain; format=flowed|
>first of all, you need to change 'NE . AND' into ' NE . AND ',
Good. It won't fix al lthe problems, but it's a start.
>second of all, run " %put &VAR; " and you will find where it's wrong,
Another good point.
>lastly, why don't you use array to do it?
> DATA NEWDATA;
> SET labdemo;
> array a_var _numeric_;
> do i=1 to dim(a_var);
> if a_var(i) = . then
> drop i;
Won't this do an OR instead of an AND on the data?
I mean, won't this delet8e if *any* of the values is
missing, instead of if *all* of the values are missing?
But I think you're on the right track here. I don't
see why a macro solution is needed. If the poster
just wants to check if all the numerics are missing, why
not use the NMISS() function to see if the number of
missings is the same as the number of variables listed?
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Get free, personalized commercial-free online radio with MSN Radio powered
by Pandora http://radio.msn.com/?icid=T002MSN03A07001