-4735   INVALID TABLE REFERENCE FOR TABLE LOCATOR

Explanation

At execution time, an SQL statement in the body of a routine has a table-locator-reference in the FROM clause to reference a transition table of the trigger invoking the routine. For example:

   TABLE (table-locator-var LIKE table-name)

SQLCODE -4735 is issued when the definition of the table that follows the LIKE keyword is different than the definition of the table specified for the table locator parameter on the CREATE PROCEDURE or CREATE FUNCTION statement for the routine.

The use of TABLE LIKE syntax provides an implicit definition of the transition table. It specifies that the transition table has the same number of columns as the identified table or view. The columns must have the same data type, length, precision, scale, subtype, and encoding scheme as the identified table or view, as described in catalog tables SYSCOLUMNS and SYSTABLESPACES. The number of columns and the attributes of those columns are determined at the time the CREATE PROCEDURE or CREATE FUNCTION statement is processed. Any subsequent changes to the number of columns in the table or the attributes of those columns does not affect the parameters of the routine.

System action

The statement cannot be processed.

Programmer response

Change the table name in the table locator reference to the name of a table that has the same definition as the table name used on the CREATE PROCEDURE or CREATE FUNCTION statement for the table locator parameter.

SQLSTATE

560CV