Re: Triggers
- From: sybrandb@xxxxxxxxx
- Date: Thu, 26 Feb 2009 19:19:14 +0100
On Thu, 26 Feb 2009 09:01:50 -0800 (PST), "amerar@xxxxxxx"
<amerar@xxxxxxx> wrote:
Hi,
We are making some changes and I'd like to know if this can be done
with a trigger.
I have Table1 which is the master table and Table2 which is the
history table. Currently we have over 100 places where Table1 is
inserted to and deleted from. After that Table2 is dealt with.
The table structures are a bit different and a couple of the columns
in Table2 come from stored procedure variables.
What we want it to put a trigger one Table1 to do the insert into
Table2 for us. This will fix any chances that Table1 is changed
without Table2 being changed also.
Since Table2 has a different structure and 2 columns come from
procedure variables, how can I access those variables?
We do not want to go to 100 places and update everything. Also, this
does away with the trigger and the tables can become out of sync....
Thanks!
Put the 'procedure variables' or whatever they may be, in a package
spec, and write a get_<variable> function to retrieve them, and a
put>_<variable> procedure to assign them. Pretty basic stuff.
--
Sybrand Bakker
Senior Oracle DBA
.
- Follow-Ups:
- Re: Triggers
- From: art@xxxxxxxx
- Re: Triggers
- References:
- Triggers
- From: amerar@xxxxxxx
- Triggers
- Prev by Date: Re: Taking export from SECONDARY_INSTANCE from 02 node RAC
- Next by Date: Re: Triggers
- Previous by thread: Triggers
- Next by thread: Re: Triggers
- Index(es):
Relevant Pages
|
Loading