Privacy guaranteed - Your email is not shared with anyone.

Welcome to Glock Forum at

Why should YOU join our forums?

  • Reason #1
  • Reason #2
  • Reason #3

Site Description

MS SQL Help Needed

Discussion in 'Tech Talk' started by IHR, Dec 3, 2004.

  1. IHR

    IHR Appaloosa Rider

    Jan 5, 2003
    Monroe, WA.
    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.