close

Privacy guaranteed - Your email is not shared with anyone.

Welcome to Glock Talk

Why should YOU join our Glock forum?

  • Converse with other Glock Enthusiasts
  • Learn about the latest hunting products
  • Becoming a member is FREE and EASY

If you consider yourself a beginner or an avid shooter, the Glock Talk community is your place to discuss self defense, concealed carry, reloading, target shooting, and all things Glock.

MS SQL Help Needed

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

  1. IHR

    IHR Appaloosa Rider

    285
    0
    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
    as
    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.

    Comments?

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