Previous Topic: Specify the Source Tables for a Materialized Query TableNext Topic: Specify Search Conditions for Generating the SQL Code for a Materialized Query Table


Specify the Materialized Query Columns

You can use the Select tab in the Materialized Query Tables editor to specify the materialized query columns.

To specify the materialized query columns

  1. Click Materialized Query Tables on the Model menu in a physical model based on DB2 LUW.

    The Materialized Query Table editor opens.

    Click the Select tab.

    The names of the tables and associated columns that can be referenced by the selected materialized query table appear in the Available Tables and Views: grid. Use the arrow button or double-click a column to move it to the Columns list and include it in the selected materialized query table. Double-click a table to move all of the columns in that table to the Materialized Query Columns list. You can add or remove tables in the Available Tables list using the options in the From tab.

    The materialized query columns assigned in the materialized query table appear in the Column grid. Use the up and down arrow buttons to move the selected column up or down one position in the list.

    The double arrow buttons move all the columns from the Available Tables list to the Materialized Query Columns list.

  2. You can also create a materialized query column reference to any table column in your model. By default, the materialized query column name reflects the column name that the materialized query table references, but you can change a materialized query column name. Select a column name in the Columns list and work with the following options:
    Alias

    Edit the alias of the selected materialized query column.

    New (Expression)

    Opens the New Materialized Query Table Column dialog where you can enter a user-defined expression as a materialized query column.

    Select Type:

    Select an expression type from the drop-down list: All or Distinct.

  3. Work with other tabs in the editor, then click Close.

    Your changes are saved and the dialog closes.

    Note: Click Cancel to close the dialog without saving your changes.