MS SQL Help Needed [Archive] - Glock Talk


View Full Version : MS SQL Help Needed

12-03-2004, 12:15
I have a trigger that seems to be causing a race condition, but I just dont know.

create trigger trig_UPS_Update
on orders
for insert
insert into UPS_Shipping
select * from vw_UPS_Shipping vs
where vs.[order number] not in ( select iOrder from UPS_Shipping)

(vw_UPS_Shipping is a view built from selected columns of orders.)

Could the above trigger cause a DB to crash because of a race condition. I suspect that if too many orders come in one after another, and the sub select has any kind of delay, that would do it.


I've replaced this trigger with a stored proc that is run every so often.