Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » Context-Sensitive Help » Query Editor



Use this tab to restrict the rows in your result set based on group values.


Criteria   Use the Criteria pane to enter your HAVING conditions. You can type directly into this pane, or use the Expression Editor. To edit existing expressions, highlight the expression before you open the Expression Editor. Otherwise, what you create in the Expression Editor is appended to previously existing expressions.

Build HAVING expression   Click the Build HAVING expression button, located in the bottom right of the Criteria pane, to open the Expression Editor and build your HAVING condition.

Results   Click Results at the bottom of the window to see the results of your query, or an error message if the query contains errors.

SQL   Click SQL at the bottom of the window to see the SQL code for your query.

About HAVING conditions

HAVING conditions can only be used if either the statement has a GROUP BY clause or the selected columns in the Columns tab include only aggregate functions. Any column names referenced in the HAVING clause must either be in the GROUP BY clause or be used as a parameter to an aggregate function in the HAVING clause.

See also