Syntax of the CONTAINS operator of the WHERE option
The CONTAINS operator has the following syntax in the WHERE option of the record phrase:
Syntax
WHERE field CONTAINS string-expression
field
A field or array of type CHARACTER that participates in a word index.
string-expression
An expression of type CHARACTER that represents possible contents of field. The syntax of string–expression is as follows:
"word[[ & | | | ! | ^ ] word ]..."
word
The word to search for.
The ampersand (&) represents logical AND, while the vertical bar (|), the exclamation point (!), and the caret (^) represent logical OR. AND limits your search to records that contain all words you specify, while OR enlarges your search to include any word you specify. You can combine ANDs and ORs within string–expression. You can also group items with parentheses to create complex search conditions.
You can use a wild card on the end of a string. For example, the string "sales*" represents "sales," "saleswoman," "salesman," "salesperson," and similar strings.
You can also define a character variable and assign a value to that variable.