Literal Value Comparison in SharePoint Search SQL Syntax
Applies to: SharePoint Server 2010
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 Multivalued (ARRAY) Comparisons in SharePoint 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 SharePoint Search SQL Syntax
Multivalued (ARRAY) Comparisons in SharePoint Search SQL Syntax