Syntax of the CONTAINS operator of the WHERE option
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The CONTAINS operator has the following syntax in the
WHERE option of the record phrase:
Syntax
|
- field
- A field or array of type
CHARACTERthat participates in a word index. - string-expression
- An expression of type
CHARACTERthat 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 logicalOR.ANDlimits your search to records that contain all words you specify, whileORenlarges your search to include any word you specify. You can combineANDs andORs 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.