Existing queries

You can set up and use queries that cover regular searches. Using stored queries ensures that the same search parameters are used each time that a query is run.

Listing existing queries

To list queries, you can:

  • Select Analysis > Queries > List .
  • In the Database Explorer, right-click Queries and select List.
Double-click a query to open it. The Description column might contain notes to help you identify the purpose of the query.
Tip: You can also move the mouse pointer over a query to view a description of the query, if one is available.

Running an existing query

  1. In the Database Explorer, right-click Queries and select List.
  2. Double-click the query that you want to run.

    The query is shown as a diagram in the Structure area. The diagram contains icons for the entity types that you want to query and, if there are two or more entity types, links defining the relationship between the entities. The labels of the entities and links can contain information on the purpose of the query.

    Distinct counts are shown without an asterisk, as in (Count = n)

  3. There might be some conditions (restrictions) on how the records for each entity and link type in the Structure area are searched. Click each entity and link type in turn to view their conditions. There can be one condition per entity and link type.
  4. When you are satisfied that the query is correct, click Results.

    All the records that meet the criteria that are specified in the query are listed on the Results page. The total number of records is displayed below the Results list. Notice that only the first 40 fields are displayed.

    Note: If any of the entities or links have a parameterized condition, youare prompted to enter it.

Rerunning a query

To rerun a query, click Refresh on the Results page of the query.

If any of the entities or links have a parameterized condition, you can enter new values.

Results of a query

You can work with the records found by running a query:
  1. On the Results page of the query, select one or more records.
  2. Right-click and then select an action from the menu. For example, select Add to Set to save the results of the query. This is a convenient way of keeping a permanent record of the results of the query for this point in time.
    Note: From time to time, you may need to click Refresh to update the list of records. For example, until you refresh the list, a record that you have deleted will remain in the current list, or the old data for a record will be displayed.

Saving the results of a query

To keep a permanent record of the results of the query when run on a particular date and time:
  1. On the Results page of the query, select one or more records.
  2. Right-click and select Add to Set.
    Note: You can also run an existing query by right-clicking on the query and selecting Records.