Home » Replace a SQL WHILE Loop with Set Based Logic in T-SQL