cavtel
asked on
DB2 Trigger Error.
Hi,
I am trying to write a trigger on a table. I have written following code
CREATE TRIGGER QGPL/TRG_TEST
AFTER INSERT ON QGPL/TESTTRIGGER
REFERENCING NEW ROW AS NROW
FOR EACH ROW MODE DB2ROW
WHEN (NROW.SOSTAT = 'ASSN')
BEGIN
INSERT INTO QGPL/TESTTRIGGER values(NROW.SONO, 'AUTO', NROW.SOTYP);
END
But i am getting error as
Character ''' not valid following string ', '.
String '); ' contains a character that is not valid.
Please help.
Thanks.
I am trying to write a trigger on a table. I have written following code
CREATE TRIGGER QGPL/TRG_TEST
AFTER INSERT ON QGPL/TESTTRIGGER
REFERENCING NEW ROW AS NROW
FOR EACH ROW MODE DB2ROW
WHEN (NROW.SOSTAT = 'ASSN')
BEGIN
INSERT INTO QGPL/TESTTRIGGER values(NROW.SONO, 'AUTO', NROW.SOTYP);
END
But i am getting error as
Character ''' not valid following string ', '.
String '); ' contains a character that is not valid.
Please help.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
DB2 error messages tend to steer your eyes away from the real problem. (BTW, this isn't unique to IBM's SQL.)
Remove the ';' from the INSERT statement and try again.
Kent