Finding Information

Contents | Index


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.

Tasks

Using Predefined Queries

Creating, Running, and Saving Queries

Refining Queries

Renaming Queries

Deleting Queries

Finding Records in Lists

See Also

Simple Query Operators and Examples

Compound Query Operators and Examples

Selecting the Default Query for a Screen


Back to top


Using Predefined Queries

A predefined query is a query with specific criteria already defined. Predefined queries are set up by your Siebel administrator.

To run a predefined query

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.


Back to top


Creating, Running, and Saving Queries

To find information, you can create, run, and save queries at any time within your Siebel application.

To create a query
  1. Make the list or form where you want to query the active list or form in the application window, and then click the New Query button.
    - or -
    In the list or form where you want to find records, click Query.
    - or -
    In the list or form where you want to find records, click the menu button, and then click New Query.
    If you are creating a query in a list, an empty row appears. If you are creating a query in a form, a blank form appears.
  2. Define your query criteria by completing the fields in the row or in the form.
    Note: The Siebel application automatically assumes a wildcard exists at the end of your query criteria. This means that if you search for Siebe, the Siebel application looks for all words beginning with the letters Siebe.
To run a query

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.

To save a query
  1. Create and run a query.
  2. From the application-level menu, choose Query, then Save Query As.
    The Save Query As dialog box appears.
  3. In the Query Name field, type a name for the query, and then click OK.
    The saved query is now available for selection from the Queries drop-down list.

Back to top


Refining Queries

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 refine a query
  1. From the Queries drop-down list, select the query you want to refine.
    Note: To repeat the query currently shown in the Queries drop-down list, click the menu button, and then click Run Query.
    Matching records appear in the application window.
  2. Click the menu button, and then click Refine Query.
    - or -
    From the application-level menu, choose Query, then Refine Query.
  3. Refine your query criteria by changing or completing the fields.
  4. Click the Execute Query button.
    Records that match your criteria appear.
  5. To save the refined query with the same name, from the application-level menu, choose Query, then Save.
    - or -
    To save the refined query with a different name, from the application-level menu, choose Query, then Save Query As, type a name for the query, and click OK.

Back to top


Renaming Queries

To rename a query, you must save an existing query with a different name.

To rename a query
  1. From the Queries drop-down list, select the query you want to rename.
    Note: To repeat the query currently shown in the Queries drop-down list, click the menu button, and then click Run Query.
    Matching records appear in the application window.
  2. From the application-level menu, choose Tools, then User Preferences.
    The User Preferences screen appears.
  3. On the link bar, click Saved Queries.
    The Saved Queries list appears.
  4. In the Name field, type a new name for the query.
  5. Click OK.

Back to top


Deleting Queries

You can delete saved queries from the Queries list.

To delete a query
  1. Navigate to the appropriate screen for the query.
  2. From the application-level menu, choose Query, then Delete Saved Query.
    The Delete Record dialog box appears.
  3. In the Query Name list, select the query you want to delete, and then click OK.

Back to top


Simple Query Operators and Examples

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:
  • You cannot use * to find dates.
  • To find words on more than one line in a field, you should use * to separate the words. You cannot query for control characters or non-printable characters, such as line feeds (LF) or carriage returns (CR).
? 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.

Back to top


Compound Query Operators and Examples

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.

Back to top


Finding Records in Lists

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.

To find records in a list
  1. Navigate to the screen.
  2. In the list header, select a field you want to search from the drop-down list for record fields.
  3. In the list header, type the text you want to search for in the field for a search value.
    A wildcard is automatically assumed at the end of text you enter in the value field. If you search for Siebe, then all words beginning with the letters Siebe are found.
  4. Press ENTER.
    The records that match the criteria appear.

Back to top


Contents | Index

Copyright © 2013, Oracle. All rights reserved.