View Single Post

   
  #7 (permalink)  
Old 04-08-2008, 11:59 AM
DA Morgan
 
Posts: n/a
Default Re: procedure called by trigger can't see new data

tacrawford@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@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Reply With Quote