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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Archive Deleted Rows

Re: Archive Deleted Rows

From: Ed Prochak <edprochak_at_magicinterface.com>
Date: Fri, 09 Aug 2002 12:51:14 GMT
Message-ID: <3D53E77C.272F4FCC@magicinterface.com>

Adrienne wrote:
>
> We have a lot of archive/history tables throughout our db model. What
> I would like to do is create triggers on each table to call the same
> generic stored procedure. Code maintentance would be alot easier. I
> assume I can just call the procedure and pass in the table name. Then
> in the procedure just append "_archive" to insert into the proper
> archive table. How can I handle the diff number of columns throughout
> the tables. Can I pass in an array or a cursor of some type, or the
> whole row?
>
> Thanks again.

You could use a ROWTYPE, as long as both tables have the same structure.

But I wonder, why use triggers? On systems I've worked on the choice was to use a batch program to do this kind of work when the system was less busy. It was written in Pro*C and driven by another table which informed it
how old the data had to be for each table.

HTH
  Ed

-- 
Edward J. Prochak   --- Magic Interface, Ltd.
Ofc: 440-498-3700
on the web at       --- http://www.magicinterface.com
email: ed.prochak_at_magicinterface.com
Received on Fri Aug 09 2002 - 07:51:14 CDT

Original text of this message

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