This is a continuation of the SQL Screw-ups series that stemmed from my Nashville .NET User Group talk on 03/14/2019. Slides and setup details are on the first post in the series.
The rule of thumb around cursors and while loops in SQL is simply don’t do it unless you must. Let’s look at a scenario in which you should not use a loop, and then we’ll look at a problem that is easily solved by a loop.
Continue reading “SQL Screw-ups: Cursors and While Loops”