Skip to Content
-1

Trigger On $TA table is not updating for :newrow but it work for already existing row

Nov 30, 2017 at 06:26 AM

27

avatar image

Hi Experts,

Below trigger is not working for newly inserted record but working for the existing records(see comments query below)

As suggestion will be helpful.

CREATE TRIGGER "TRI_FEED_ITA" AFTER INSERT ON "FEED_TA" REFERENCING NEW ROW AS newrow FOR EACH ROW BEGIN DECLARE LBO_TYPE VARCHAR(1000) :=''; DECLARE LENTITY_TYPE VARCHAR(1000) :=''; DECLARE LPAGE_NO INT; DECLARE LUUID INT; IF :newrow"UUID" is not null THEN SELECT "F""BO_TYPE" INTO LBO_TYPE FROM "FEED_TA" AS "F" WHERE "UUID" = :newrow"UUID"; SELECT "F""ENTITY_TYPE" INTO LENTITY_TYPE FROM "FEED_TA" AS "F" WHERE "UUID" = :newrow"UUID"; SELECT "F""PAGE_NO" INTO LPAGE_NO FROM "FEED_TA" AS "F" WHERE "UUID" = :newrow"UUID"; LUUID = :newrow"UUID"; UPDATE "$TA_ITA_FEED" SET BO_TYPE = :LBO_TYPE WHERE "UUID" = :LUUID; UPDATE "$TA_ITA_FEED" SET ENTITY_TYPE = :LENTITY_TYPE WHERE "UUID" = :LUUID; UPDATE "$TA_ITA_FEED" SET PAGE_NO=:LPAGE_NO WHERE "UUID" = :LUUID; --UPDATE "$TA_ITA_FEED" SET BO_TYPE =:LBO_TYPE, ENTITY_TYPE =:LENTITY_TYPE,PAGE_NO=:LUUID WHERE "UUID" = 8; END IF; END;

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers