AMT Help Files
Home AMT Developer Studio AMT Enterprise Repository Database Stored Procedures Code

Code

To add the SQL code for the stored procedure, select the node in the navigation pane that corresponds to the database type used in your runtime environment:

Enter the SQL code in the details pane. To use parameter names in the code, prefix them with the "@" sign. Refer to your database management system documentation to learn about supported syntax.

Screenshot showing the AMT Developer Studio interface with database-specific code nodes in the navigation pane and SQL code entry area in the details pane

Note:

  1. AMT Developer Studio does not perform syntax checks on this code. Therefore, you must test it manually. If stored procedures contain invalid code for the runtime database system, this will cause errors during database reorganization.
  2. AMT does not support multiple result sets in stored procedures. Therefore, if a stored procedure contains two SELECT queries, only the first can be used to read the result set. For the second one, you need to use Output parameters to get information, but you cannot return a result set cursor.
  3. Oracle and DB2 stored procedure code must include BEGIN and END keywords, with the executable code placed between them.
  4. Oracle does not support SELECT statements in stored procedures for returning result sets directly. When using SELECT in Oracle stored procedures, it will not return a result set. Therefore, you must use SELECT in combination with INTO to put the results into a second table.

Contents

 Go to top