set nocount on
declare @rowcount varchar(100) ;
while (1=1)
begin
delete top (1000) t from perfmon t where machinename is null
select @rowcount = @@rowcount
if @rowcount = 0 break;
RAISERROR(@rowcount, 0, 1) WITH NOWAIT
waitfor delay '00:00:00.200'
end