Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Insert Trigger problem
Helmut,
If the 500 rows insertion has not been completed then when the trigger on table A fires for the second time, it would wait for the completion of the 500 rows insertion before it attempts to insert the records.
Remember, if u have a date column which is set to sysdate or a sequence no. column in the RESULTS table, then u may be able to process the records in the RESULTS in the way they were inserted...
Regards
Rajagopal Venkataramany
On Fri, 15 Dec 2000 10:40:49 -0800, ORACLE-L_at_fatcity.com wrote:
> Hi!
>
> I am having an interesting problem here:
>
> A user is inserting a record into table A. This table has an after insert
> trigger associated with it that inserts three rows in table RESULT.
> Shortly after that, the user inserts a record into table B. This table
has
> an after insert trigger associated with it that inserts 500 rows in table
> RESULT.
>
> Now the user goes back to table A and inserts another record into table
A,
> which causes the trigger to insert another three recors in the table
> RESULTS. Then the user inserts into table B again... And so on and so
forth.
>
> The question is: does the trigger on table A (when it is called the
second
> time) wait for the 500 records from the table B trigger to be inserted or
> does it fire right away when the user inserts another record?
>
> The deal is that we need the records in the RESULT table to be in a
specific
> order. In other words: the trigger on table A would have to 'wait' for
the
> trigger on table B (that is inserting far more records) to finish before
it
> is executing again.
>
> Is there any way to do that?
>
> This is 8.1.6 on Win2k.
>
> Thanks,
> Helmut
>
>
> PS: Does anybody have an idea how SQL Server 7 handles that problem?
Because
> we would have to do the same thing on SQL Server 7 as well...
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Helmut Daiminger
> INET: hdaiminger_at_vivonet.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).
Regards
Rajagopal Venkataramany
![]() |
![]() |