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: procedure called by trigger can't see new data

Re: procedure called by trigger can't see new data

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 19 Dec 2006 14:52:01 -0800
Message-ID: <1166568718.846429@bubbleator.drizzle.com>


tacrawford_at_adelphia.net wrote:
> I have a table that contains project data (table 1). I also have
> a table that contains the starting/ending dates of each project (table
> 2). When I modify the required_weeks column, I need to re-calculate
> the starting/ending dates for all projects in that resource slot.
> What had been done was an AFTER UPDATE trigger on the project
> table (table 1) that called a stored proc to calculate the
> starting/ending dates for all projects in the same resource slot of the
> modified project.
> These starting/ending dates were queried from the project table
> (table 1), math was applied, then they were written to the dates table
> (table 2).
> The problem that exists is that apparently the data is not
> committed when the trigger runs, causing the stored proc to query the
> OLD data when it is trying to calculate the starting/ending dates.

That is the expected behaviour. Can you use the :NEW environment variables to get what you need?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Dec 19 2006 - 16:52:01 CST

Original text of this message

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