IN

Log Parser

IN

<field_expr> [ NOT ] IN ( <value_rows> )
( <field_expr_list> ) [ NOT ] IN ( <value_rows> )

The IN and NOT IN operators determine whether or not a given field-expression or list of field-expressions matches any element in a list of values.


Remarks:

  • Use the comma character (,) to separate values in a single list row, and use the semicolon character (;) to separate list rows.


Examples

A. Single field-expression

The following example expression determines if the "Age" field matches any value in the specified list:
Age IN (20; 30; 45; 60)
This example is equivalent to the following expression:
Age = 20 OR Age = 30 OR Age = 45 OR Age = 60

B. List of field-expressions

The following example expression determines if the pair of "FirstName" and "State" fields matches any pair of values in the specified list:
(FirstName, State) IN ('Johnson', 'OR'; 'Smith', 'WA')
This example is equivalent to the following expression:
(FirstName = 'Johnson' AND State = 'OR') OR (FirstName = 'Smith' AND State = 'WA')


See also:

Expressions
Field-Expressions


© 2004 Microsoft Corporation. All rights reserved.