var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Update trigger: getting old value and new value
Im facing some problem with the update trigger,
I wrote a short script to actually insert a new record in a table
once a record is updated..
Lets say i have two tables
1) Master - OldValue
2) Slave - OldValue, NewValue
Master table has 1 column (OldValue)
Slave table has 2 columns (OldValue,NewValue)
I want each updated record to be stored in Slave table with OldValue and NewValue
Below is my script
L> create or replace trigger testtrigger
2 before update on master
3 for each row
5 insert into slave values (: Old.OldValue);
6 end testtrigger
The problem is the my script can only get the old value, how do i actually get the new value and store it in a single record in slave table?
I even tried to use the update after trigger, but returned compilation error
create or replace trigger testtrigger1
after update on master
for each row
insert into slave values (: old.OldValue,:new.OldValue);
Any guidance will be appreciated..thanks..
Last edited by a1jit; 02-15-06 at 06:17.
thanks guys, manage to do it using the following url