insert #DeleteSpots
Select os.Linked_ID, os.BID
from #olspot ols
join dbo.ORDERED os on os.bid = ols.bid
AND os.B_Position IN(0,1,3)
where os.Linked_ID is not null
and os.B_Position = 3