Re: PL/SQL question
Date: 1995/06/13
Message-ID: <3rjuus$agc_at_pubxfer5.news.psi.net>#1/1
Timothy Dry <tdry_at_sierra.net> wrote:
> I've created a trigger that detects updates after they have
>happened. Within the trigger I would like to record the "old"
>and "new" values for each column that has changed.
> Since I have a large number of columns in the table I've put
>the names of the columns in a seperate table which I loop over
>and do an "IF UPDATING( col_name )" on. Since the column name
>is a variable, I don't think I can directly reference it as a
>column within ":OLD" or ":NEW". I have also tried to read
>the old value out of the database, but get the "ORA-04091
>table XXX is mutating..." error.
> Any help or suggestions about how I can accomplish this
>would be greatly appreciated. Even suggestions about an
>entirely different approach are welcome.
The column names are already in user_tab_columns (providing your DBA ran the script to create the views). And if you are doing this from FORMS then you could use the PRE-FIELD trigger to store the value as it comes from the DB.
>Thanks,
>Tim Dry
>tdry_at_sierra.net
Scott Mattes
I-Net, Inc
Scott_Mattes_at_NAVSEALOG.I-Net.com
All rights reserved, no warrenty expressed or implied, void where prohibited by law. My mileage varies. Received on Tue Jun 13 1995 - 00:00:00 CEST