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

Home -> Community -> Usenet -> c.d.o.misc -> Re: mutating table issue

Re: mutating table issue

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Fri, 18 Oct 2002 18:37:59 +1000
Message-ID: <NzPr9.56070$g9.160775@newsfeeds.bigpond.com>


Hi Cynic,

I've read it a copy of times and I think I follow (only think).

Option 1 could be to just use a statement level trigger (if applicable).

If not, option 2 could be to use a before statement trigger to perform the checking and store any info away that might be necessary for the row level triggers.

Cheers

Richard
"Cynic" <asdf> wrote in message news:uqun5v3rj4sc1_at_corp.supernews.com...
> I have a table that holds, say, sales order line info, SALES_ORDER_LN,
that
> contains the cols SO_NUM, SO_LN_NUM, and SO_VALUE. (ok, my real scenario
is
> more complex, but it is basically the same problem). Anyway, I need to
have
> a trigger on the SALES_ORDER_LN table that will check to see if that
SO_NUM,
> has a record that has a SO_VALUE of a particular value. So, if I insert
the
> following data:
>
> SO# LN# VAL
> ---- ----- ------
> 10 2 C
>
> In the trigger, I want to check that SO# to make sure that SO#10 doesn't
> contain a record (line#) that has a SO_VALUE of "A". So, my challenge is
> finding a way to query the SALES_ORDER_LN table in the trigger that
resides
> on that table. Hence, I get the mutating table.
> I hope this wasn't too confusing of a description.
>
> Basically, if the following exists....
>
> SO# LN# VAL
> ---- ----- ------
> 10 1 A
>
> and I insert this....
>
> 10 2 C
>
> I want to be able to know that 10/1/A exists so I can do another action.
>
> Thanks.
>
>
Received on Fri Oct 18 2002 - 03:37:59 CDT

Original text of this message

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