Hi, I have two tables
1. nav.temp1 (user_id, type, email_address, update_user, update_date)
2. nav.temp1_hist ((user_id, type, email_address, update_user, update_date)
If the email_address is updated in the nav.temp1, then I would like to insert the record in the nav.temp1_hist with the old email_address and update user fields before updating the email_address in the nav.temp1. I am using the following trigger to do this task
create trigger nav.trg_update_temp1_hist no cascade before update of email_address on nav.temp1
REFERENCING OLD AS old_row FOR EACH ROW MODE DB2SQL
insert into nav.temp1_hist (user_id, type, email_address, update_user, update_date)
values (old_row.user_id, 'EMAIL', old_row.email_address, old_row.update_user, current timestamp);
But I am getting the following error message when creating the trigger.
The trigger "nav.trg_update_temp1_hist" is defined with an unsupported triggered SQL statement.. SQLCODE=-797, SQLSTATE=42987, DRIVER=3.63.108
Please help.
Thanks
Nav
1. nav.temp1 (user_id, type, email_address, update_user, update_date)
2. nav.temp1_hist ((user_id, type, email_address, update_user, update_date)
If the email_address is updated in the nav.temp1, then I would like to insert the record in the nav.temp1_hist with the old email_address and update user fields before updating the email_address in the nav.temp1. I am using the following trigger to do this task
create trigger nav.trg_update_temp1_hist no cascade before update of email_address on nav.temp1
REFERENCING OLD AS old_row FOR EACH ROW MODE DB2SQL
insert into nav.temp1_hist (user_id, type, email_address, update_user, update_date)
values (old_row.user_id, 'EMAIL', old_row.email_address, old_row.update_user, current timestamp);
But I am getting the following error message when creating the trigger.
The trigger "nav.trg_update_temp1_hist" is defined with an unsupported triggered SQL statement.. SQLCODE=-797, SQLSTATE=42987, DRIVER=3.63.108
Please help.
Thanks
Nav