Show TOC

 Inserting a Reference to Another Query

Use

If you insert a reference to another query in the current query, the query steps in the referenced query are executed as well when you execute the current query. You can display the query steps of the referenced query in the current query. You can edit them only in the referenced query, however.

Note Note

If you want to edit the query steps in the current query, you must insert a copy of a query instead of the reference. In this case, however, the reference to the original query you copied is lost, meaning that if you change the original query, the changes are not included in the query that contains the copy.

End of the note.

Prerequisites

The Edit Query: Step Overview screen is displayed. For more information about how to get to this screen and for other prerequisites, see Creating and Editing Queries .

Procedure

  1. Position the cursor on one of the following:

    • If you want to insert the reference to the other query at a specific position in the current query, position the cursor on the query step after the required position in the current query.

    • If you want to insert the reference to the other query as the last step in the current query or if the current query does not yet contain any query steps, position the cursor on the root of the tree structure of the current query.

  2. Choose with the quick info text Reference Query .

    The group overview for the queries then appears.

  3. Double-click the query to which you want to insert a reference in the current query.

    The reference to the query is inserted in the current query under a new query step. The new query step is assigned the key of the referenced query.

  4. Save the query.