Was this helpful?
Partial Match Specification
QUEL supports special characters for use with comparison operators (in particular, the equals operator) to indicate partial matches of character string (c, char, varchar and text) data. These characters allow the following partial match specifications:
*
matches any string of zero or more characters
?
matches any single character
[ .. ]
matches any of the characters in the brackets
QUEL allows any of these special characters singly or in combination to specify partial match criteria, as the following examples illustrate:
e.ename="*"
matches any value in "e.ename". If e.ename is nullable, * does not match NULL values.
e.ename="E*"
matches any value beginning with "E".
e.ename="*ein"
matches any value ending with "ein".
e.ename="*[aeiou]*"
matches any value with at least one vowel.
e.ename="Br???"
matches any five-character value beginning with "Br".
e.ename="[A-J]*"
matches any value beginning with A, B, C, ..., J.
e.ename="[N-Z]???"
matches any four-character value beginning with N, O, P, ..., Z.
Blanks must not be embedded in bracketed expressions such as "[A-J]*" or "[N-Z]???."
The special meaning of these characters can be disabled in a clause by preceding them with a backslash character (\). Thus, "\*" refers to the asterisk character. However, in an assignment (as opposed to a clause), the special characters do not perform a partial match specification, as in the following:
jtitle  =  "**accountant**"
Because the fragment above assigns a value "**accountant**" to the column "jtitle," the asterisks need no escape treatment with the backslash. However, to retrieve the value so assigned requires the following syntax:
j.jtitle="\*\*accountant\*\*"
Last modified date: 08/28/2024