Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: procedure called by trigger can't see new data
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.orgReceived on Tue Dec 19 2006 - 16:52:01 CST