[row trigger] generic access to fields
Hello,
I'm trying to create an after insert/update row trigger that copies (all) current values to a corresponding history table. I'd like to create a generic triger that does not need any change if source and target table have their fields modified.
Unfortunately a insert into target_table select :new.* from dual; does not compile on a 10g database.
insert into target_table select * from source_table where ID = :new.id; raises the mutating table error and encapsulating this select in an autonomous transaction does not see the new values.
The only way out of this problem I found was to remember the altered ID's in a temporary table and copy the values within an after statement trigger.
Is there any other solution?
bye
TPD