IN macro

The IN macro is available in HCL® Campaign and HCL Interact.

Syntax

valuet IN (value1 AND value2 . . . .) or valuet IN subquery

Parameters

The first form permits using a list of values instead of a subquery.

The second form uses a subquery that is evaluated to produce an intermediate result, against which further processing can be performed.

Description

The IN predicate lets you use a list of values instead of a subquery, or will introduce a subquery.

Note: The IN predicate has a negative version, NOT IN. The format for this is identical to IN. NOT IN is true only if the provided value is not found in the values returned by the subquery.
Important: When using IN in HCL Interact, you can only use the value IN (value1 AND value2 . . . .) syntax.

Examples

TEMP = IN(25, COLUMN(1...10))

Returns the specified column(s) from a data range

TEMP = IN("cat", COLUMN("cat", "dog", "bird"))

Creates a new column named TEMP containing the value one.

TEMP = IN(V1, V1)

Creates a new column named TEMP containing all ones.

TEMP = IN(V1, V2)

Creates a new column named TEMP, where each value is a one if the corresponding row of column V1 contains a value in column V2, else a zero.