Hi,
I'm new to DB2 from SQL Server, There's a problem with the syntax
below, is anyone able to see what the issue is? Do I have too many
semi colans?
CREATE TRIGGER AUDIT
AFTER UPDATE ON ABEFORE
REFERENCING OLD AS O
FOR EACH ROW MODE DB2SQL
WHEN ('YES' IN SELECT CONTROLFLAG FROM TRIGGERCONTROL WHERE
TRIGGERNAME = 'AUDIT')
BEGIN ATOMIC
INSERT INTO AAFTER (AAFTERID,NAME, TIMESTAMP) VALUES
(O.ABEFOREID,O. NAME,CURRENT TIMESTAMP);
END;
I have a table called ABEFORE and a table called AAFTER, the insert
statement works fine when I pass in 1,'TEST' CURRENT TIMESTAMP
Any help would be appreciated.
I'm new to DB2 from SQL Server, There's a problem with the syntax
below, is anyone able to see what the issue is? Do I have too many
semi colans?
CREATE TRIGGER AUDIT
AFTER UPDATE ON ABEFORE
REFERENCING OLD AS O
FOR EACH ROW MODE DB2SQL
WHEN ('YES' IN SELECT CONTROLFLAG FROM TRIGGERCONTROL WHERE
TRIGGERNAME = 'AUDIT')
BEGIN ATOMIC
INSERT INTO AAFTER (AAFTERID,NAME, TIMESTAMP) VALUES
(O.ABEFOREID,O. NAME,CURRENT TIMESTAMP);
END;
I have a table called ABEFORE and a table called AAFTER, the insert
statement works fine when I pass in 1,'TEST' CURRENT TIMESTAMP
Any help would be appreciated.
Comment