Previous Topic: Define View SourcesNext Topic: Change the SQL Code for a View


Define SQL Code Generation Criteria for a View

Use the Clauses tab in the PostgreSQLView Editor to specify the search conditions and criteria used to generate the SQL code for a materialized view.

To define SQL code generation criteria for a view

  1. Right-click the view for which you want to define SQL code generation criteria and click Properties.

    The PostgreSQL View Editor opens.

  2. Click the Clauses tab and work with the following options:
    Where

    Lets you enter the search condition that must be satisfied by the results of the view query. The text you enter becomes the WHERE clause in the SQL code that is generated for the selected view.

    Group By

    Lets you enter the criteria that you want to use to group rows returned by the view query. The text you enter becomes the GROUP BY clause in the SQL code that is generated for the selected view.

    Having

    Lets you enter the search condition that is applied to each row group, and filter out rows that do not meet the specified search condition. The text you enter becomes the HAVING clause in the SQL code that is generated for the selected view.

    Note: This option is only available if your target DBMS supports the HAVING clause.

  3. Click Close.

    SQL code generation criteria is defined for the selected view and the PostgreSQL View Editor closes.