Building a subquery, To build a subquery – HP Intelligent Management Center Standard Software Platform User Manual
Page 477
•
They allow you to restrict the values returned by the subquery with a
WHERE clause.
Subqueries allow you to pose complex questions that are difficult or
impossible to formulate with simple query filters. For example: what is the
list of customers and their associated revenue where the customer purchased
a service that had previously been reserved (by any customer) in Q1 of 2003?
Building a subquery
You build a subquery in the Query Filters pane of the Query Panel.
Note:
You can mix subqueries and other types of query filter in the Query Filters
pane.
To build a subquery
1.
Add the objects that you want to appear in the query to the Result Objects
pane.
2.
Select the object that you want to filter with a subquery, and then
click Add a subquery.
The subquery outline appears in the Query Filters pane. By default the
object you selected appears as the FIlter object and Filter By object. For
more information on the Filter Object and Filter By object, see
.
3.
To add a WHERE condition to the subquery, drag a query object to the
white area of the subquery outline.
Note:
You can use an existing subquery or standard query filter as a WHERE
condition in a subquery. To do so, drag and drop the existing filter or
subquery to the white area of the subquery outline.
4.
Select the operator and values used to filter the object in the WHERE
condition.
Crystal Reports 2008 SP3 User's Guide
477
18
Building Queries
Filtering data using subqueries and database ranking