Date: Tue, 12 Apr 2005 18:55:25 -0400
Reply-To: Raynald Levesque <rlevesque@videotron.ca>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Raynald Levesque <rlevesque@videotron.ca>
Subject: Re: Stuck with the use of ANY
In-Reply-To: <17927481346.20050412174738@terra.es>
Content-type: text/plain; charset=ISO-8859-15
Hi Marta
The definition of ANY in spssbase.pdf is
ANY(arg,arg list) True if value of first argument is included on argument
list.
You used
ANY(flag1 TO flag30,1))
This tests whether flag1 equals any of flag2 TO flag30, or 1.
You should have used
ANY(1,flag1 TO flag30)
Regards
Raynald Levesque Raynald@spsstools.net
Visit my SPSS site: http://www.spsstools.net
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Marta García-Granero
Sent: April 12, 2005 11:48 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Stuck with the use of ANY
Hi list
I know this item has been discused in the list, but I can't find it...
I have a collection of 30 "flags" (flag1 TO flag30), that mark data
with inconsistent data in a collection of triplets of variables (30
triplets, one flag per triplet). I want to select those cases with a
any flag = 1.:
SELECT IF(flag1 EQ 1) OR (flag2 EQ 2).....
I tried SELECT IF (ANY(flag1 TO flag30,1)), but I must be doing
something wrong, because the 864 cases are selected (and I positively
know that errors are a minority of the data...).
I suppose I can try something like:
COMPUTE sumflag=SUM(flag1 TO flag30).
EXEC.
SELECT IF sumflag GT 0.
....
But there is something really bad (or good?) in my character: I can
never go on with my work without solving every question...
Thanks
Marta