Literal Value Comparison in Windows SharePoint Services Search SQL Syntax

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Uses standard comparison operators for matching a single-valued column to a literal value.

…WHERE <column> <comp_op> <literal>

Remarks

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

For information about comparing multivalued columns, see Multi-valued (ARRAY) Comparisons in Windows SharePoint Services Search SQL Syntax.

The column part can be any valid column. The literal can be any string, numerical, hexadecimal, Boolean, or date literal value. Only exact matches are allowed, and wildcard characters 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

Examples

Following are examples of the literal value comparison predicate.

…WHERE Author='John Smith'

…WHERE BugStatus != "Resolved"

…WHERE size >= 10000

See Also

Reference

Non-Full-Text Predicates in Windows SharePoint Services Search SQL Syntax