I'm running something like this:
waitfor delay '00:00:05'
insert top (1000) into TableB Select *
from TableA A where A.ID not in (select ID from TableB) -- not already inserted
if @@rowcount > 0 goto more
Assuming there are 100,000 records to be inserted (100 loops), should I expect to get a result when it's halfway through if I run:
select count(*) from TableB with (nolock)
Or will my count be 0 until it completes ?Update: I cancelled the insert, modified some code, and now it seems to be working .... basically: inefficient code.