SQLCODE -104 on a CREATE TRIGGER statement using syntax supported by DB2 UDB EE
Receiving SQLCODE -104 on a CREATE TRIGGER statement using syntax that is supported by DB2® UDB EE.
If you are using syntax that is supported by DB2 on other platforms, you might encounter this error. SQL code -104 can result if there was an SQL statement in the trigger body that had a subselect specified for an expression. In DB2® for z/OS and OS/390® R510, R610, and R710, an expression cannot be a subselect.
R810 allows a subselect as an expression. Here is an example of this type of CREATE TRIGGER statement that would cause this error prior to R810:
CREATE TRIGGER TRGTEST
BEFORE INSERT ON TABB
REFERENCING NEW AS NEWROW FOR EACH ROW
= (SELECT MAX(COLA) FROM TABA);
Translate this page: