Prompted by a daily "SQL Tip" email a few days ago that recommended the correlated subquery to solve the cumulative total problem, this 5 minute
screencast (5:02) demonstrates that the cursor solution indeed out-scales the set-based correlated subquery for this particular problem.
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using
About Paul Nielsen
Paul Nielsen believes SQL is the romance language of data. As such he’s a hands-on database developer, Microsoft SQL Server MVP, trainer, and author of SQL Server Bible series (Wiley). As a data architect, he developed the concepts of Smart Database Design and Nordic – an open source O/R dbms for SQL Server. He lives in Colorado Springs.