Set Membership Functions
Set membership functions determine whether a value is a member of a set. They take a set of numeric arguments or a set of string arguments, and produce Boolean results.
String comparisons are performed according to the rules given for Relational Operators. User-missing string values are treated as valid values.
-
ANY(VALUE, SET [, SET]...)
Returns true ifVALUE
is equal to any of theSET
values, and false otherwise. For numeric arguments, returns system-missing ifVALUE
is system-missing or if all the values inSET
are system-missing. -
RANGE(VALUE, LOW, HIGH [, LOW, HIGH]...)
Returns true ifVALUE
is in any of the intervals bounded byLOW
andHIGH
, inclusive, and false otherwise.LOW
andHIGH
must be given in pairs. Returns system-missing if anyHIGH
is less than itsLOW
or, for numeric arguments, ifVALUE
is system-missing or if all theLOW
-HIGH
pairs contain one (or two) system-missing values. A pair does not matchVALUE
if eitherLOW
orHIGH
is missing, even ifVALUE
equals the non-missing endpoint.