Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Using :new and :old dynamically

Using :new and :old dynamically

From: Mike Bradicich <Mike_at_Bradicich.Com>
Date: Fri, 07 May 1999 15:52:28 -0400
Message-ID: <37334478.B67B7940@Bradicich.Com>


Any suggestions to this one are greatly appreciated.

I want to right a generic procedure, or reusable trigger code, that references the values of :new and :old dynamically. In otherwords, if I write code in a trigger for table A, I want to be able to reference the values in :new and :old without having to code each column name.

I can extract the names of the columns in table A by doing a simple query against the sys.col table. Then for each one of those columns I want to write a record to a table showing the :old value and :new value. But I can't write dynamic code that references the :new and :old columns at run time!?

I want a complete audit, BUT THE NORMAL ORACLE AUDIT COMMANDS WON'T WORK because they do not track the old and new values.

I could write a separate and specific peice of code for every table, and every column, but I want to avoid that. I want to have one generic procedure, or at most a generic set of code that I can use in each trigger.

Any ideas on referencing :NEW and :OLD dynamically, or creating an audit that tracks the new and old values without having to write specific code in every trigger?

Your ideas are very much appreciated.
Mike Bradicich
Bradicich Consulting
Mike_at_Bradicich.com Received on Fri May 07 1999 - 14:52:28 CDT

Original text of this message

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