The standard Like predicate is supported, either with pattern expressions or with subqueries. The percent (%) or underscore (_) characters can be used to allow searching for a pattern. The percent character represents zero or more characters of any value, whereas underscore represents exactly one. An “escape” character may optionally be specified to allow searching for patterns that include a percent (%) or underscore (_) character by placing an escape character immediately before either of these characters.
Some examples of the form that the Like predicate can take include the following.
expression LIKE ‘pattern’ expression LIKE ANY/ALL (pattern list) expression LIKE ANY/ALL (subquery) (expression list) LIKE ANY/ALL (subquery)
When dragging a Like operator into a variable, the following tree element is created.
Columns and/or other expressions can be moved into the (empty) branches of the tree, where the first argument is the expression to the left of the LIKE and the second to the right. The subquery element is found in the Other - Expert category of SQL Elements.
The following are some examples of different Like predicates in WHERE clauses.
expression LIKE ‘pattern’
expression LIKE ANY/ALL (pattern list)
expression LIKE ANY/ALL (subquery)
(expression list) LIKE ANY/ALL (subquery)
The Like operator contains one property, an optional Escape Character, that may be set by clicking Properties.