after statement trigger, updating table

From: Franz Achermann <acherman_at_asterixiam.unibe.ch>
Date: 5 Oct 1994 13:38:01 GMT
Message-ID: <36ua7p$45t_at_aragorn.unibe.ch>


Hi,

I have the following problem:

I would like to make an 'UPDATE' on table A, with every 'INSERT' of a row into table A.
I cannot use 'after row trigger' since table A is locked, when doing an insert of several rows. So I would like to use an after statement trigger, looping over all inserted rows, and doing the correct update.

How can I select exactly these rows, which has been entered by the INSERT Statement causing the after statement trigger to fire ?

I see one solution:

using a row trigger, which stores each ROWID of table a when insered into an external table. The after statement trigger then reads this external table, is doing the update of Table A, and deleting the external table (or at least all rows in it).

Big honor to the one, proposing a better solution.

Franz Achermann (acherman_at_iwi.unibe.ch) Received on Wed Oct 05 1994 - 14:38:01 CET

Original text of this message