SPSS has the ANY function. It can look for a list of values within a single variable, like this:
SELECT IF ANY(VAR1,'A','B').
Or it can look for a single value within a list of variables, like this:
SELECT IF ANY(5,Var1, Var2, Var3).
HTH.
Craig Johnson wrote
SAS has a function which allows you to do something like
PROC SQL;
SELECT *
FROM WHATEVER
WHERE VAR1 IN ('A','B');
QUIT;
Does SPSS have something equivalent to the In() function?
Conceptually like.....
SELECT IF VAR1 IN ('A','B') ?
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/"When all else fails, RTFM."
PLEASE NOTE THE FOLLOWING:
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (
https://listserv.uga.edu/).