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 need to get all of the projects in the same resource slot, > including the modified one. The non-modified projects are not in the > :NEW variables. > > DA Morgan wrote:
>> 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.
Then you need to do two things.
-- 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 - 21:05:01 CST