Specify a HAVING Clause
To add a HAVING clause
to a data 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 enter a value in the
Filter
fields field to locate the column.
-
Double-click the column or
drag and drop it in the
SQL expression area.
-
For
character variables, you can click
column_name Values to
view the values for the column. In the
Filter Values window,
select the values that you want to include in the filter.
Click Apply to
add the unique values to the SQL expression area.
-
(Optional) You can click
the Functions tab and select the functions
to use with filtering.
-
(Optional) You can add a
subquery to the filter using a table from a different
library. On the
Libraries tab, click
to add a library.
After you select a library, expand the library node, and select the table that you
want to use for the subquery.
Note: In the SQL expression, you
must enclose the subquery in parentheses.
-
Edit the HAVING clause
in the
SQL expression.
The syntax
is identical to that shown in step 6 of Specify a WHERE Clause.
-
Click
to save the filter.
Copyright © SAS Institute Inc. All Rights Reserved.