I have an app with the database in DB2 where I use
triggers for automatic creation of new id-keys when
inserting new rows in the app-tables.
I have earlier run the app in DB2 for NT but are now
going to move the database to an OS/390-machine.
The version of DB2 is 6.1 on both machines.
The problem is that I have failed to create the triggers
on the OS390-machine, the same triggers triggers which
have been working fine on the NT.
An example of trigger:
CREATE TRIGGER PREINADM
NO CASCADE BEFORE INSERT ON Administrator
REFERENCING NEW AS new
FOR EACH ROW MODE DB2SQL
SET new.iId = (SELECT COALESCE(MAX(iId), 0) + 1
The error message I receive says nothing to me:
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0969N There is no message text corresponding to SQL error "-20100" in the
message file on this workstation. The error was returned from module
"DSNHPARS" with original tokens "2 -104 42601 COALESCE,+ ) - ".
Is there anybody who can help me ?