Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Instead of trigger problem

372209Apr 25 2008 — edited May 7 2008
(Apex 3.1.0.00.32, Oracle 10GR2, Windows OS) I have a view doing a select on 2 tables. I created a report/form combo using the APEX wizards and created 3 separate triggers that fire on insert/update/delete. From TOAD all (Ins, Upd., Del) works as expected, using APEX I get an error message doing an insert: 'ORA-22816: unsupported feature with RETURNING clause', update and delete do work as expected.

I cleared the 'Return Key into Item' field on the process row screen to no avail. I searched the forum but didn't find any clear solution. Any help/solution would be greatly appreciated.

By the way: both tables have a primary key and there is a foreign key constraint between the two tables.

the instead-of-insert trigger:

CREATE OR REPLACE TRIGGER AGENDA.V_PERS_WW_INS
INSTEAD OF INSERT
ON AGENDA.V_PERS_WW
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
declare
nr number;
BEGIN
INSERT INTO persoon
(naam, opmerking)VALUES ( :NEW.naam, :NEW.opmerking) returning pers_id into nr;
insert into pers_werkweek
(pers_id,ma,di,wo,do,vr,za,zo)values(nr,:new.ma, :new.di, :new.wo, :new.do, :new.vr, :new.za, :new.zo);

exception
when others then
raise;

END;

tia,
Martin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2008
Added on Apr 25 2008
8 comments
2,670 views