You can use the Stored Procedures dialog to add, change, view, or delete stored procedures for the model, tables, or views. You can review or assign the type of stored procedure and whether it is generated in the schema. You can also assign the Function command here.
To define a stored procedure
The Stored Procedures dialog opens.
Note: For a Teradata DBMS, the Database menu selection is Macros, and it opens the Macros dialog.
The New Stored Procedure dialog opens.
The stored procedure name and the first line of the stored procedure code, which can include SQL statements and macros are displayed. You can use the Display field to filter the stored procedure list to show Model-level Only, Table-level Only, or All. The order in which you add stored procedures to your model is important. The stored procedure code is generated according to the order the stored procedures display in the Stored Procedures dialog. You can change this order at any time by using the up and down arrow buttons in the Stored Procedure Browser.
A model-level script is executed either before or after the schema generation script.
A table level script is included either before or after the CREATE TABLE statement.
Indicates whether the stored procedure will be generated by your database. Clear this check box to not generate the stored procedure to the schema.
Sorts the stored procedures in the Stored Procedures list alphabetically by stored procedures name. Appears only when you create a model-level script.
Opens the Stored Procedure Browser where you can attach, review, and detach stored procedures to tables and views.
You can complete the fields on the Code, Expanded tabs and then optionally select the Comment or UDP tab to add a comment or user defined property.
Click OK.
Your changes are saved and the Stored Procedures dialog closes.
Note: Click Cancel to close the dialog without saving your changes.
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |