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 -> Re: Using :new and :old dynamically

Re: Using :new and :old dynamically

From: Dante <dnotari_at_my-dejanews.com>
Date: Fri, 07 May 1999 21:15:31 GMT
Message-ID: <7gvl5f$8t$1@nnrp1.deja.com>


Mike,
  Oracle Designer/2000 - a CASE Tool - would help not only    with the metamodel and the generation of DDLs for your    tables, it has as well the possibility to have    "JOURNAL" tables and triggers created.

   Have a look at
 http://www.oracle.com/tools/des2k/index.html

Regards
Dante
In article <37334478.B67B7940_at_Bradicich.Com>,   Mike Bradicich <Mike_at_Bradicich.Com> wrote:
> 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
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri May 07 1999 - 16:15:31 CDT

Original text of this message

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