Steps to create a query set
Procedure
- Select two query subjects that meet these requirements:
- Each query subject must have the same number of columns.
- Columns must be in the same order.
- Columns must have the same or similar data types.
The data types do not need to be exactly the same if those in the second result set can be automatically converted by the data source to data types compatible with those in the first result set.
For example, one query subject contains country data and uses
intas the data type. Another query subject contains country data and usessmallintas the data type. Framework Manager imports these query subjects asint16andint32and performs asetoperation.
- Click Actions, Define Query Set.
- Click the Definition tab.
- In the Name box, give the query set a name.
- Review the Query Subject boxes to
ensure the order that the query subjects will display in the
Selectclause is correct.The order could be important if you want a specific set of column names (aliases) that displays in only one of the query subjects. If the order is incorrect, cancel this query set and start again.
For union and intersect, the order of the query subjects does not matter. You can change the order and receive the same answer. For except, the order of the query subjects does matter.
- Use the Operator box to define how
the rows of the query subjects are combined.
Option
Description
Union
Retrieves all unique rows from both sets. Duplicates are removed.
Intersect
Retrieves rows that are common between the query subjects.
Except
Retrieves rows that exist in the first query subject and not in the second query subject.
- To create a Union All, Intersect All, or Except All operation, clear the Remove Duplicate Row check box.
- Choose the action that that you want.
Goal
Action
Work with the calculations that are embedded in the query subjects
Click the Calculations tab.
You can add or edit the calculations and change the order of the calculations.
Work with the filters that are embedded in the query subjects
Click the Filters tab.
You can add or edit the filters, change the order of the filters, and change the usage of filters.
Test the query set
Click the Test tab.
- Click OK.
Results
- Embedded calculations Creating calculations
- Embedded filters Creating filters
- Determinants Specifying determinants
- Testing the query set or changing the test settings Testing query subjects or query sets