ALLBASE/SQL Reference Manual (36216-90216)
Chapter 9 273
Search Conditions
LIKE Predicate
% represents any string of zero or more characters; for
example, THOMAS and TOM both satisfy the predicate
NAME LIKE '%O%'.
The _ and % symbols can be used multiple times and in
any combination in a pattern. You cannot use these
symbols literally within a pattern unless the ESCAPE
clause appears, and the escape character precedes them.
Note that they must be ASCII and not your local
representations.
HostVariable1
identifies the host variable in which the pattern is stored.
IndicatorVariable1
names an indicator variable, an input host
variable whose value determines whether the associated
host variable contains a NULL value:
>= 0
the value is not NULL
< 0
the value is NULL
EscapeChar
describes an optional escape character which can be used
to include the symbols _ and % in the pattern.
The escape character must be a single character, although
it can be a one- or two-byte NLS character. When it
appears in the pattern, it must be followed by the escaped
character, host variable or, _, or %. Each such pair
represents a single literal occurrence of the second
character in the pattern. The escape character is always
case sensitive. All other characters are interpreted as
described before.
HostVariable2
identifies the host variable containing the escape
character.
IndicatorVariable2
names an indicator variable, an input host
variable whose value determines whether the associated
host variable contains a NULL value:
>=0
the value is not NULL
< 0
the value is NULL
If the escape character is NULL, the predicate evaluates
to unknown.
LocalVariable2
contains the escape character.