To add a HAVING clause
to a query:
-
-
On the
Fields tab,
expand the table node and select the column to use for filtering data.
The
Output Columns node includes the calculated
columns.
Tip
You can type in the filter
fields text field to locate the column.
-
Double-click the column
or drag it to the SQL expression area.
-
(Optional) You can click
the
Functions tab and select the functions
to use.
-
For character variables,
you can click the
column-name Values button
to select the distinct values of the column. Select and clear the
check boxes to specify the values to include in the filter.
Click
Apply to
add the distinct values to the SQL expression area on the right.
-
Edit the HAVING clause
in the SQL expression area as follows:
|
|
|
|
Add an equal sign between
the column name and the distinct value.
|
|
More than one character
value
|
Specify an IN operator
and enclose the distinct values in parentheses.
|
CARS.Make IN (
'Acura', 'Audi')
|
|
Specify a numeric operator
and a constant, or a numeric operator and another column name.
|
AVG(CARS.Horsepower) >= 165
PRDSALE.Actual > PRDSALE.Estimate
|
-
Click
to save the filter with the query.