HP Storage Essentials Storage Resource Management Report Optimizer Software 6.0 Building Reports Using the Web Intelligence Java Report Panel (August 2008)

Filtering data using subqueries and database ranking106
For more information on viewing the SQL generated by Web Intelligence, see ”Viewing
and editing the SQL behind the query definition” on page 43.)
Note: SQL is the query language supported by all relational databases (RDBMS), although
each database has its own syntax.
Building a subquery
You build a subquery in the Query Filter 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.
3. 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 ”Subquery parameters” on page 107.
4. To add a WHERE condition to the subquery, drag a report object to the area of the
subquery below the Drop an object here boxes.
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 area of the subquery below the Drop an object here boxes. To copy rather
than move the existing filter to the WHERE condition, hold down the Control key
while dragging and dropping. In this case the existing filter remains in its initial
place and becomes part of the WHERE condition of the subquery.
5. Select the operator and values used to filter the object in the WHERE condition.
NOTE: For more information on query filter operators and values, see ”Filtering
data retrieval using query filters” on page 83.
6. Click Subquery to add an additional subquery to the query filter.
By default the two subqueries are linked in an AND relationship. Click the AND
operator to toggle between AND and OR.
In addition to linking subqueries in AND or OR relationships, you can nest them
(create subqueries within subqueries) by dragging an existing subquery to the area
beneath the Drop an object here boxes. In this case the inner subquery becomes part
of the WHERE condition of the outer subquery. To copy rather than move the subquery
to the WHERE condition, hold down the Control key while dragging and dropping. In