Using @VALONEOF
Use @VALONEOF
to compare a column or string to a list of values.
@IF (@VALONEOF (STATE, 'CA', 'NY'), 'COAST', 'MIDDLE')
In this example, if STATE
is CA
or NY
, the expression returns COAST
, which is the response returned by @IF
when the value is non-zero (meaning TRUE
).