Partager via


Literal Value Comparison

The literal value comparison uses standard comparison operators for matching a single-valued column to a literal value. For information about comparing multi-valued columns, see Multi-Valued (ARRAY) Comparisons.

The following example shows the literal value comparison predicate syntax:

...WHERE <column> <comparison operator> <literal>

Note  The right side of the comparison must be a literal. You cannot compare a column against a computed value, and you cannot compare a column against another column.

The column part is any valid property column and can be type-cast if necessary. You can enclose the column name in double quotes for readability without affecting functionality. For more information, see Casting the Data Type of a Column.

The literal can be any string, numeric, hexadecimal, Boolean, or date literal, enclosed in single quotation marks. Only exact matches are allowed, and wildcards are ignored. The literal can also be type-cast.

The following table describes the supported comparison operators.

Comp_op Description
= Equal to
!= or <> Not equal to
> Greater than
>= Greater than or equal to
< Less than
<= Less than or equal to
BEFORE Before a given string, in dictionary sort ordering.
AFTER After a given string, in dictionary sort ordering.

Examples

The following are examples of the literal value comparison predicate.

...WHERE
System.Title = 'Accounting'

...WHERE
System.IsFlagged != TRUE

...WHERE
System.Size >= 10000

...WHERE
System.Author BEFORE 'd'

Note  If you create predicates with multiple ranges, the ranges must by in alphanumeric order.