Simple Query Operators
You can use several simple query operators to define query criteria.
The following table describes simple query operators. In this table, operators appear in uppercase but they do not have to be in uppercase. Query strings are case-sensitive. You can use simple query operators on their own.
Operator |
Description |
Example |
---|---|---|
* (asterisk) |
Wildcard operator. Placed anywhere in a string, returns records containing the string or containing the string plus any additional characters, including a space, that appear at the location of the asterisk. You cannot use an asterisk to find dates. To find words on more than one line in a field, you must use an asterisk to separate the words. You cannot query for control characters or non-printable characters, such as line feeds (LF) or carriage returns (CR). |
If performance is poor when you use the asterisk, then substitute "IS NOT NULL" in the query field. This substitution often improves performance. |
? (question mark) |
Wildcard operator. Placed anywhere in a string, returns records containing the characters in the string plus any one additional character that appears at the location of the question mark. |
|
"" (double quotation marks) |
Placed before and after a string, returns records that exactly match the string, unless modified by a wildcard operator (* or ?). Quotes find a group of words in the exact order with the exact uppercase or lowercase lettering. |
|
= (equals) |
Placed before a value, returns records containing a value equal to the query value. |
For CIAI-enabled fields, if you type |
< (less than) |
Placed before a value, returns records containing a value less than the query value. |
|
> (greater than) |
Placed before a value, returns records containing a value greater than the query value. |
|
<> (not equal to) |
Placed before the value, returns records containing a value that is not equal to the query value. |
|
<= (less than or equal to) |
Placed before a value, returns records containing a value less than or equal to the query value. |
|
>= (greater than or equal to) |
Placed before a value, returns records containing a value greater than or equal to the query value. |
|
NOT LIKE, not like |
Placed before a value, returns records not containing the value. |
|
IS NULL, is null |
Placed in the query field, returns records for which the query field is blank. |
|
IS NOT NULL, is not null |
Placed in the query field, returns records for which the query field is not blank. |
|
~ (tilde) |
Placed before LIKE and a value with a wildcard operator, returns all matching records regardless of case. |
You can enter a CIAI
query expression for a contact as follows: |