Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Complex Integrity Checking
two questions: How many records do you insert into that table before a
commit ?
Is the whole issue simply mutating table error when running some business logic in an insert/update trigger for the intervals table?
Regards,
Waleed
-----Original Message-----
To: Multiple recipients of list ORACLE-L
Sent: 6/5/02 4:33 AM
First of all I want to thank you all for your answers. Let's take'em one by one:
ORA-25002: cannot create INSTEAD OF triggers on tables Cause: Only BEFORE or AFTER triggers can be created on a table. Action: Change the trigger type to BEFORE or AFTER.
I have an Oracle database version 9.0.1.1.1
FUNCTION check_for_overlapped_intervals (
p_start_time IN NUMBER,
p_end_time IN NUMBER)
RETURN NUMBER
IS
n NUMBER;
BEGIN
CREATE OR REPLACE TRIGGER bi_interval
BEFORE INSERT OR UPDATE
ON intervals
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
IF check_for_overlapped_intervals(:new.start_time, :new.end_time) <> 0
THEN
raise_application_error(-20100, 'Overlapped intervals');
END IF;
END;
but still got the same mutating table error. Am I wrong someplace.
CREATE TABLE intervals (
start_time NUMBER NOT NULL, end_time NUMBER NOT NULL
Please try to insert some data and implement an integrity system like I
wanted
Regards
iulian
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: Iulian.ILIES_at_orange.ro Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Khedr, Waleed INET: Waleed.Khedr_at_FMR.COM Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Jun 05 2002 - 08:53:22 CDT
![]() |
![]() |