Creating a Subquery Filter Using a HOLD File

How to:

In InfoAssist, you can create a subquery using a HOLD file. A subquery is a nested query that is added to the Where clause of an SQL statement. A subquery is valuable because it is highly reusable.


Top of page

x
Procedure: How to Create a Subquery Filter Using a HOLD File

This procedure describes how to create a subquery filter using a HOLD file created in the previous procedure.

  1. Build a report.

    An example report is shown in the following image.

    Example Report

  2. On the Data tab, in the Filter group, click Advanced Filter.

    The Advanced Filter dialog box opens.

  3. In the Advanced Filter dialog box, from the Type drop-down menu, select Subquery as the filter type for the left-most part of the expression, as shown in the following image.

    Subquery selection in the Type drop down menu

  4. From the Subquery drop-down menu, select In list as the comparison operator, as shown in the following image.

    In list selected as comparison operator

  5. From the list of subqueries, select the subquery that was created (in this example, File1) for the right-most part of the expression.

    The Subquery drop-down menu with the File1 Subquery is shown in the following image.

    File1 Subquery in the Subquery drop-down menu

  6. Click OK.

    The report is filtered by the subquery that you created.

    An example of the report filtered by female customers is shown in the following image.

    Report filtered by female customers

    Note: To view the SQL statements generated by the request, go to the Quick Access Toolbar, open the Run drop-down menu, and select SQL Trace.


WebFOCUS