Previous Topic: Create User-Defined SQL Code for a Materialized Query TableNext Topic: Attach a Materialized Query Table to a Script


Add a Stored Procedure for a Materialized Query Table

You can use the Stored Procedure dialog to add a stored procedure to a materialized query table.

To add a stored procedure for a materialized query table

  1. In a physical model based on DB2 LUW, right-click a materialized query table and select Stored Procedure Properties.

    The Stored Procedure editor opens.

  2. Click New, enter a name for the stored procedure in the Name box, and click OK.

    The new stored procedure is listed.

  3. Verify the Table-level stored procedures button is selected on the General tab. Select the Code tab and enter the code for the new stored procedure in the Code box. You can use macros in the stored procedure template.

    Select the Comments tab and enter comments about the stored procedure or select the UDP tab and specify a user-defined property for the stored procedure. Click OK.

    Your changes are saved and the dialog closes.

Note: The order in which you add stored procedures to your model is important. The stored procedure code is generated according to the order in the Stored Procedures dialog. You can change this order at any time by using the up and down arrow buttons.

More information:

Define a Stored Procedure