Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Generic Insert Procedure to history tables
Adrienne wrote:
> Upon delete of a row, we are creating triggers to insert the row into
> a archive/history tables. What we could do is create a trigger for
> each table and each trigger will specify the archive table name,
> column names and values. To us it makes more sense to just create one
> common procedure for each trigger to call and send in the table
> name(since we will have a standard to name all archive tables
> <tablename>_ARCHIVE and the row values. The problem is that all
> tables have a different number of columns, and it makes more sense to
> just pass in the row and have the procedure insert the values in the
> same order. Is it possible to pass in an array of values or a cursor?
> I haven't seen any examples of this. Or is creating a trigger for
> each tablename our only way to implement this?
>
> Thanks in advance for any help.
Your attempt to simply will do exactly the opposite. One trigger per table unless you wish to write a lot of code to extract information from the data dictionary tables.
Daniel Morgan Received on Tue Aug 06 2002 - 19:29:16 CDT
![]() |
![]() |