Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Avoiding "ORA-04091 table string.string is mutating"

Avoiding "ORA-04091 table string.string is mutating"

From: Carlo Sirna <carlo.sirna_at_digisoft.it>
Date: Mon, 3 Nov 2003 16:18:26 +0100
Message-ID: <bo5rk6$17dclc$1@ID-135096.news.uni-berlin.de>


Hi, maybe this is a faq but I didn't find any solution...

I have a table like this one, which describes some time intervals in the form [startdate,enddate].

create table mytab
(

       startdate date not null,
       enddate date not null

)

I don't want this table to contain overlapping intervals: it must be impossible to insert a record that overlaps with an already existing one or to update an existing record in order to make it overlap over onto another one.

I had no problems in writing a before insert trigger that performs the required test, but I don't know how this check could be performed in a before update trigger.

p.s: this table contains about one hundred thousands of records: I can't keep it all in package variable...

Any Ideas?

   Thanks in advance,

Carlo Sirna Received on Mon Nov 03 2003 - 09:18:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US