Hello everyone,
I need your help to create a trigger into APEX.
The idea is to duplicate all rows from the table A when inserting a row in the table B. The trigger should also include an update statement to only update one column in the table A.
I've tried the following code but unfortunately it doesn't work...
CREATE OR REPLACE TRIGGERÂ "Insert_update_trigger"
AFTER
insert on "Table_B"
for each row
BEGIN
insert into Table_A
SELECT *
FROM Table_A
where A.Key is not null;
update Table_B
JOIN Table_A
ON A.SET_ID = B._SET_ID
SET A.SET_ID = B.SET_IDÂ + 1;
END;
Is there a better way to write this statement? Or at lease a code that works?
Thanks in advance for your help.