Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Bogus table for "instead of" trigger
damorgan wrote:
> I can not make sense of your question. If you want to put a trigger on
> the table put a trigger on the table. It just won't be an "instead of"
> trigger.
This may be a very special case, but the example below shows what I wanted to accomplish, I just got puzzled when I made it:
CREATE TABLE ranged_table
(low NUMBER, high NUMBER, group_id VARCHAR2(128), user_sid VARCHAR2(128));
CREATE VIEW ranged AS
SELECT * FROM ranged_table;
CREATE OR REPLACE TRIGGER range_trigger
INSTEAD OF INSERT ON ranged
FOR EACH ROW
DECLARE
articleID NUMBER;
BEGIN
FOR i IN :new.low .. :new.high LOOP
INSERT INTO group_mapper VALUES (i, :new.group_id, :new.user_sid);END LOOP;
If I insert a lot of records, I'm not interested in anything by an "instead of" trigger. But the explanations so far satisfy my curiosity. Sort of ;)
Morten Received on Thu Feb 07 2002 - 15:02:07 CST
![]() |
![]() |