Thanks for your reply! That's sort of what I thought was happening. Is there anything I can do about the order in which the query is compiled?
This is the SQL code for it:
INSERT INTO Interval_BM ( BhId, DatMons, X1, Y1, Z1, X2, Y2, Z2, Comment, [Value], Depth1, Depth2, IntervalTypeId )
SELECT...