Hi all
I have a table ,say SUMMARY. I need to write a trigger in such a way that in another table ,say TRN, when an INSERT occurs I need to insert some data from fields of TRN and its child table TRNCHILD should go to summary.
If it was only from one table , I can write ...
CREATE OR REPLACE TRIGGER TRG_TRN
AFTER INSERT ON TRN
FOR EACH ROW
BEGIN
If INSERTING Then
INSERT INTO SUMMARY(a,b,c) VALUES(:NEW.Val A,:NEW.ValB,:NE W.ValC);
END IF;
END
My Question is if ValC is from TRNCHILD, which has a link with TRN, how can I get this data????
Regards
Reshmi
I have a table ,say SUMMARY. I need to write a trigger in such a way that in another table ,say TRN, when an INSERT occurs I need to insert some data from fields of TRN and its child table TRNCHILD should go to summary.
If it was only from one table , I can write ...
CREATE OR REPLACE TRIGGER TRG_TRN
AFTER INSERT ON TRN
FOR EACH ROW
BEGIN
If INSERTING Then
INSERT INTO SUMMARY(a,b,c) VALUES(:NEW.Val A,:NEW.ValB,:NE W.ValC);
END IF;
END
My Question is if ValC is from TRNCHILD, which has a link with TRN, how can I get this data????
Regards
Reshmi
Comment