Dear nice guys,
I just start to write AFTER INSERT trigger.
The trigger aims to insert one record in BOOK when there is new record inserted in SYSTEMDATA with some field checking(checking is okay)
The error is that when I insert 3 new records in SYSTEMDATA, the trigger generate more than 3 records in BOOK.
Could anyone tell me what wrong??
Some code:
<code>
create trigger AfterInsertSysData
on SYSTEMDATA
after insert
as
insert into BOOK(rid, fname, book_date)
select r.rid, fname, book_date from SYSTEMDATA s, RESIDENT r
where substring(upper(r.type),1,1) in ('F','M','U','R') and
r.rid = (select rid from inserted)
</code>
Thanks you very very much!!!!!!!!!!!!!