Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Insert Trigger problem

RE: Insert Trigger problem

From: Djordje Jankovic <djankovic_at_corp.attcanada.ca>
Date: Sun, 17 Dec 2000 10:24:50 -0500
Message-Id: <10713.124794@fatcity.com>


As Henry said there is no order in rows in a table, so the question of whether one insert waits for another has not that many importance to you.

In fact the transactions do not wait one for another to commit, as they are running concurently and they do not lock one another. You could change that default behaviour in a couple of ways, but I guess that this would not be of interest to you.

You can retrieve rows in the order you need if you incrporate the ordering information in the RESULT table - like source_table ('A', or 'B') and date_inserted (you could use sysdate for that).

Djordje

-----Original Message-----
From: Henry Poras
To: Multiple recipients of list ORACLE-L Sent: 12/16/00 9:00 PM
Subject: RE: Insert Trigger problem

There is no order to rows in a relational table. Each row is independent of
the others (of course that doesn't mean that some vendors don't ignore this). Can you try adding a flag to your fields to accomplish what you need?

Henry

-----Original Message-----
Sent: Friday, December 15, 2000 1:40 PM
To: Sawyer Joey; Oracle List (Telelist); Oracle DBA List (Lazy DBA); Frach Karsten; Eftimescu Nico

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...



Think you know someone who can answer the above question? Forward it to them!
to unsubscribe, send a blank email to oracledba-unsubscribe_at_LAZYDBA.com to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Henry Poras
  INET: Henry.Poras_at_ctp.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 Received on Sun Dec 17 2000 - 09:24:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US