Queries let you find records that meet certain criteria. The Queries drop-down list in the Siebel application toolbar lets you retrieve previously saved queries. You can select a query from this list to retrieve all the records that match the criteria defined in the query.
Creating, Running, and Saving Queries
Simple Query Operators and Examples
Compound Query Operators and Examples
Selecting the Default Query for a Screen
A predefined query is a query with specific criteria already defined. Predefined queries are set up by your Siebel administrator.
Note: To repeat the query currently shown in the Predefined Queries drop-down list, click the Execute Query button or click the menu button, and then click Run Query.
To find information, you can create, run, and save queries at any time within your Siebel application.
If you executed the query in a list, records that match your criteria appear in the list. If you executed the query in a form, the first record that matches your criteria appears in the form.
You can refine the parameters of any query, a predefined query or a query you saved earlier.
Note: If you refine the parameters of a predefined query, you can only save your changes by saving the query with a different name.
To rename a query, you must save an existing query with a different name.
You can delete saved queries from the Queries list.
When you create a query, you use operators or conditions which the application uses to search the database for matching records.
Operator | Description | Example |
* | Wildcard operator. Placed anywhere in a string, returns records containing the string or containing the string plus any additional characters at the position at which the asterisk appears, including a space. |
*rang* finds arrange, arranged, orange, orangutan, range, ranges, ranging, rang, strange, stranger, strangest, strangle, wrangle, and so on. Notes:
|
? | Wildcard operator. Placed anywhere in a string, returns records containing the characters specified in the string, such that any character may appear at the location of the question mark. |
?rag finds brag, crag, and drag. t?pe finds type and tape. |
"" | Surrounds a string that, unless modified by a wildcard (* or ?), must be matched exactly. Quotes let you query for groups of words in their exact order. | "Sun Solaris" finds records for which the value in the query field is Sun Solaris. |
= | Placed before a value, returns records containing a value equal to the query value. | =Smith finds all records for which the value in the query field is Smith. |
< | Placed before a value, returns records containing a value less than the query value. | <6/20/01 finds all records in which the value of the query field is less than 20 June 2001. When entering a date, use the format that is specific to your implementation. |
> | Placed before a value, returns records containing a value greater than the query value. | >5/31/01 finds all records in which the value of the query field is greater than 31 May 2001. When entering a date, use the format that is specific to your implementation. |
<> | Placed before the value, returns records containing a value that is not equal to the query value. | <>6/20/01 finds all records in which the value in the query field is not 20 June 2001. <>Paris finds all the records in which the value in the query field is not Paris. |
<= | Placed before a value, returns records containing a value less than or equal to the query value. | <=500 finds all the records in which the value in the query field is less than or equal to 500. |
>= | Placed before a value, returns records containing a value greater than or equal to the query value. | >=500 finds all records in which the value in the query field is greater than or equal to 500. |
IS NULL, is null |
Placed in the query field, returns records for which the query field is blank. | Enter IS NULL in the Due Date query field to find all records for which the Due Date field is blank. |
IS NOT NULL, is not null |
Placed in the query field, returns records for which the query field is not blank. | Enter IS NOT NULL in the Due Date query field to find all records for which the Due Date field is not blank. |
LIKE | Placed before a value, returns records containing the value. | LIKE Smi* finds all records in which the query field starts with Smi. Note: This operator is not required in simple queries. In the example above, entering Smi* (without LIKE) in the query field returns the same results. To find matches regardless of case, you can use ~ (tilde). See ~ for details. |
NOT LIKE | Placed before a value, returns all records not containing the value. | NOT LIKE Smi* finds all records in which the value in the query field do not start with Smi. |
~ | Placed before LIKE and a value with a wildcard operator, returns all matching records regardless of case. | ~LIKE Smi* finds all records in which the value in the query field starts with Smi, smi, SMI, and so on. Note: Using this operator may affect performance. |
When you create a compound query, you must use parentheses to control the order in which the application looks for matching records.
Operator | Description | Example |
AND and |
Placed between values, returns only records for which all conditions are true. | performance* AND *memory* finds all records in which the query field starts with performance and also contains memory. *disk* and *crash* finds all records that contain both disk and crash in the query field. |
OR or |
Placed between values, returns records for which at least one condition is true. | *performance* OR *memory* finds all records that contain either performance or memory in the query field. performance or memory* finds all records in which the query field value is performance or in which the query field starts with memory. |
NOT not |
Placed before a value, returns only records not containing the value. | *performance* AND NOT LIKE *memory* finds all records that contain performance but not memory in the query field. NOT (performance OR memory) finds all records that contain neither performance nor memory in the query field. |
() | Surrounds the values and operators that will be processed first, regardless of the default processing order. | (sun* OR moon*) AND NOT *stars* returns records in which the query field starts with sun or moon, but does not contain stars. (performance* OR memory*) AND LIKE (*problem*) finds all records in which the query field starts with performance or memory and also contains problem. |
A list can contain many records. You might find it necessary to search for the records you want to see in the list. You can perform full- or partial-text searches on one field.
Finding records is similar to querying for records, but you do not save search results when you query for records.
Copyright © 2013, Oracle. All rights reserved.