Dear everyone,
I use AFTER INSERT triggers to insert records in one table based on another table.
When user insert 1 record in SYSTEM_DATA table, the trigger will fire and insert 1 record in BOOK table accordingly.
But there ar 3 records inserted by triggers in BOOK after 2 records inserted in SYSTEM_DATA. I don't know what error I have made.
Could anyone point the error to me?? And How can I fix it??
Trigger code following:
create trigger AfterInsertSysData
on systemDataTest
after insert
not for replication
as
insert into fac_test (rid, fname, book_date)
select r.rid, fname, book_date from systemDataTest s, res_test r
where substring(upper(r.type),1,1) in ('F','M','U','R') and
r.rid = (select rid from inserted)
Thanks you very very much!!!!