• Yes, looks like you need to look deeper. Either that first INSERT is not doing what you think it does, or something else is deleting rows from that table.

    You could add a trigger for INSERT, UDPATE and DELETE on that table to track what is going on. Don't forget to log zero-row operations somewhere! (This trigger and the audit tables would only to debug this issue, so you would delete them later.)

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]