Query Syntax
The query syntax for the searchspec argument supports only a small subset of binary and unary operators. No Siebel Query Language constructs or functions are supported. The query syntax is summarized in the following table.
Syntax Type | Notes |
---|---|
expression |
|
[XML Tag] {Operator} {Value} |
Operator can be binary or unary. The {Value} need only be specified for binary operators. |
|
A conjugated expression must be enclosed in parentheses to avoid ambiguity. However, nonconjugated expressions must not be enclosed in parentheses. |
conjunction |
|
|
|
|
|
unary operator |
|
IS NULL |
Used to find a match for a value that has no value |
IS NOT NULL |
|
EXISTS |
|
NOT EXISTS |
|
binary operator |
|
|
|
|
Denotes a case-insensitive exact search (no wildcards used) |
|
Must be specified as < to ensure well-formed XML. |
|
Must be specified as <= |
|
|
|
|
|
Must be specified as <> |
|
Wildcard characters are treated as such only in the context of the operator LIKE. |
|
Denotes a case-insensitive wildcard search |
value |
|
|
Literal data is always enclosed in single quotes. To use a single quote within a literal, place another
single quote immediately beside that quote. In this way, the query
recognizes the quote as a literal and not as an operator. For example,
the string To use the special characters such as asterisk (*), question mark (?), and backslash (\) in queries, preceded them with the \ character. For example, to use the ? wildcard operator in a query, precede it with the \ character as follows: \? |
The following is an example from a request that follows the query syntax:
<Contact searchspec= "[ContactFirstName] = 'John ' ">
where XML Tag is Contact FirstName, the operator is = and the value is the literal value John.
An example of an expression with a conjunction is as follows:
<Contact searchspec= "[ContactFirstName] = 'Jane ' ) AND [ContactLastName] = 'Doe ' ")>
Examples of searchspec usage are given in the following table.
Operator | Usage of searchspec in request | Description |
---|---|---|
Case Sensitive LIKE with * wildcard |
|
Returns all contacts whose ContactFirstName value starts with "Contact" and ends with zero or more characters |
Case Insensitive ~ LIKE with * wildcard |
|
Returns all contacts whose ContactFirstName value starts with, for example, "Contact" or "contact" or "CoNtAcT" and ends with zero or more characters |
Case Sensitive LIKE with ? wildcard |
|
Returns all contacts whose ContactFirstName value starts with "Contact" and ends with any three characters |
Case Insensitive ~ LIKE with ? wildcard |
|
Returns all contacts whose ContactFirstName value starts with, for example, "Contact" or "contact" or "CoNtAcT", and ends with any three characters |
Case Sensitive = |
|
Returns all contacts whose ContactFirstName value is equal to "ContactInsert" |
Case Insensitive ~= |
|
Returns all contacts whose ContactFirstName value is equal to, for example, "ContactInsert","contactinsert" or "CoNtAcTiNsErT" |
IS NULL |
|
Returns all contacts whose TEXTLG_000 value is NULL |
IS NOT NULL |
|
Returns all contacts whose TEXTLG_000 value is not NULL |
AND |
Or
Or
|
Returns all contacts whose BOOL_000 value is Y AND IndexedBoolean0 value is N |
OR |
|
Returns all contacts whose BOOL_000 value is Y OR IndexedBoolean0 value is N |
> (greater than) |
|
Returns all contacts whose IndexedNumber0 value is greater than 500 |
>= (greater than or equal to) |
|
Returns all contacts whose IndexedNumber0 value is greater than or equal to 500 |
(less than) |
|
Returns all contacts whose IndexedNumber0 value is less than 500 |
(less than or equal to) |
|
Returns all contacts whose IndexedNumber0 value is less than or equal to 500 |
(not equal to) |
|
Returns all contacts whose IndexedNumber0 value is not equal to 500 |