Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 trigger not working

Author  Topic 

OMB
Yak Posting Veteran

88 Posts

Posted - 2001-06-20 : 06:38:13
here is the trigger i am having prob with


create trigger update_barcode_table on stmbiogr for insert, update as

insert into stmstdets (student_id, u_version)
select student_id, u_version from inserted
where not exists
(select * from stmstdets where stmstdets.student_id = inserted.student_id)
go

I basically want to copy any new inserted records in stmbiogr to stmstdets.

it is currently deleting the inserted record from stmbiogr and not putting the record in stmstdets.

thaxs


Edited by - omb on 06/20/2001 09:18:38
   

- Advertisement -