Re: trigger update for each row

From: <costello_at_iki.fi>
Date: 27 Jan 1999 13:59:20 +0200
Message-ID: <x13e4xncyv.fsf_at_opp6.i-have-a-misconfigured-system-so-shoot-me>


"Laimys" <lsniauksta_at_alna.lt> writes:
> I need to update one record while updating another.
> I use trigger for each row so I need to know
> old and new another record values.
> When I write such update trigger "...table mutating..."
> error occured.

How about creating a "buffer table" or temporary table and putting the modification of the other record in there and then running a background procedure (like something like using dbms_job-package) for checking for pending changes stored in buffer tables and doing them. Ugly, but this is one way.

I think it is not possible to modify the same table from for-each-row-trigger and committing both changes at once -> my opinion is that the correct way here is to build that functionality of modifying the second record to the program that originally modifies the first one.

Better ideas anyone?

-- 
Antti Järvinen, costello_at_iki.fi
            "concerto for two faggots and orchestra" 
Received on Wed Jan 27 1999 - 12:59:20 CET

Original text of this message