The comparison predicate uses arithmetic operators to compare column data to a literal value. For a row to be selected, the predicate must evaluate to TRUE. (Index Server queries that use such predicates are called relational property queries.)
Column_Reference Arithmetic_Operator Literal [ Boolean_Operator Column_Reference Arithmetic_Operator Literal ... ]
Column_Reference | Specifies the column name (alias). Its data type must be compatible with the format of the literal specified. | |||||||||||||||||||||
Arithmetic_Operator | Specifies the arithmetic operator to use to compare the column reference data to a literal value. The following table lists the operators with examples.
| |||||||||||||||||||||
Literal | Specifies a constant data value that complies with the constraints of its data type. The following literal types are supported:
| |||||||||||||||||||||
Boolean_Operator | Specifies the boolean operator to use, following the precedence rules previously stated, that combines the comparison predicates. |
The following example returns all the files that have the phrase Financial Data as the title of their document.
...WHERE DocTitle = 'Financial Data'
The following example returns all the files that have the phrase Financial Data as the title of their document or that have John James as the author.
...WHERE DocTitle = 'Financial Data' OR DocAuthor = 'John James'
The following example returns all the files that have a size less than 10,0000 or a word count less than or equal to 800.
...WHERE size < 10000 OR DocWordCount <= 800