March 11, 2004 at 2:01 am
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!!!!!!!!!!!!!
March 11, 2004 at 5:36 pm
where is join between systemdata and resident table?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply