Skip to Content
avatar image
Former Member

How to update the trigger transition variable in the BEFORE UPDATE Trigger

Hi,

We have a requirement wherein, we need to create a trigger and that trigger should be able to modify a column (LAST_MODIFIED) of the table, on which trigger is created, and puts in a value passed by a procedure.
So, here's what I tried:
CREATE TRIGGER "ABC"."UPDATE_LAST_MODIFIED"
BEFORE UPDATE ON "ABC"."CHANGE_TRACKING"
REFERENCING NEW ROW new_row
FOR EACH ROW
BEGIN
DECLARE PROC_OUTPUT TIMESTAMP;
CALL "_SYS_BIC"."POC.PROCEDURES::SP_TABLE_LAST_MODIFIED_TS" ('SETLINE_CD',PROC_OUTPUT);
new_row.LAST_MODIFIED = PROC_OUTPUT;
END;

This is throwing an error:

single assign is not allowed:

Not sure what's the restriction I am violating here and what's the correct syntax to update the column in the table when an update takes place?

Regards
Debanshu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers