Hi All,
While executing after trigger in my create trigger code, I am getting error as " modification of subject table in trigger not allowed" . Please find the sample code below:
CREATE TRIGGER "DEMO"."TRIG_DEMO1_INSERT"
AFTER INSERT
on "DEMO"."DEMO2"
referencing NEW row INSERTED
FOR EACH ROW
BEGIN
DECLARE ABC nvarchar(4);
DECLARE CDate int;
DECLARE CTime nvarchar(10);
CDate := CAST(TO_VARCHAR(CURRENT_DATE,'YYYYMMDD')AS INT);
CTime := TO_NVARCHAR(CURRENT_TIME,'HH:MI:SS');
ABC:=:INSERTED.ABC;
UPDATE DEMO2 SET XYZ = :CDate, IOP = :CurrentTime where ABC = :ABC;
END;
Can anyone tell me how can I achieve this functionality in SAP HANA?
Thanks,
Rahul Anand