I have write the query below, but I have a doubt that will this query run with inserting only new records by batches or will it run endlessly.
DECLARE @i INT
WHILE 1 = 1 BEGIN
Insert into SynState select TOP(10000) * --into SyncExchangeStateData
FROM SyncSatteTrue with (nolock)
SET @i = @@ROWCOUNT
IF @i = 0 BREAK