Figured it out. I think. It's running now. I played around and tested the inner part of the loop a bunch and it appears to work. I'll know for sure tomorrow when it finishes (or maybe in a week with 183k users to delete... <g>). This is really the first time I've ever written T-SQL in anger...
DECLARE mycursor CURSOR FOR
SELECT UserID, UserName
FROM cs_Users
WHERE ((UserName <> 'cek') AND (UserName <> 'charlie') AND (UserName <> 'Anonymous'))
ORDER BY UserName DESC;
OPEN mycursor;
DECLARE @id INT, @name VARCHAR(80), @count INT;
SET @count = 0;
FETCH NEXT FROM mycursor INTO @id, @name
WHILE @@FETCH_STATUS = 0 BEGIN
PRINT 'Deleting ='+ISNULL(@name, 'NULL');
EXEC dbo.cs_User_Delete @id, 'Anonymous';
FETCH NEXT FROM mycursor INTO @id, @name
SET @count = @count + 1;
END
PRINT 'Number of users deleted = ' + CONVERT(VARCHAR(20),ISNULL(@count,0));
CLOSE mycursor
DEALLOCATE mycursor