Trigger : table is mutating
From: (wrong string) érôme PERRET <jperret_at_freesurf.fr>
Date: Thu, 11 Jan 2001 17:09:13 +0100
Message-ID: <93klsf$ba5$1_at_wanadoo.fr>
Date: Thu, 11 Jan 2001 17:09:13 +0100
Message-ID: <93klsf$ba5$1_at_wanadoo.fr>
Hi,
What I have :
- A table with a column named MAIN
What I want :
[Quoted] [Quoted] - Only one record is the main one so only one record as the column MAIN set
[Quoted] [Quoted] to Y (Yes). Others are set to N (No)
What I tried :
- A trigger on the table (BEFORE UPDATE FOR EACH ROW) :
BEGIN
IF UPDATING AND :NEW.main='Y' THEN
UPDATE AdresseFac_Client SET main='N' WHERE main='Y' AND
ROWID!=:NEW.ROWID;
END IF;
END;
What happened :
- ORA-04091: table GESCO.ADRESSEFAC_CLIENT is mutating, trigger/function may
[Quoted] not see it
[Quoted] How can I deal with this problem ?
Jerome Received on Thu Jan 11 2001 - 17:09:13 CET