SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Solving the "Running Total" & "Ordinal Rank" Problems in SS 2k/2k5

By Jeff Moden, 2008/01/31

Total article views: 10958 | Views in the last 30 days: 473

Ladies and Gentlemen,

This article is in the process of a rewrite because of the impact that SQL Server 2005 had on the ORDER BY method for the running totals. The "quirky" update method still works as advertised, but if you have used the ORDER BY method, you need to make some serious changes to guarantee the correct update order.

The new article will be published with the same URL so as not to break anyone's links.

Heh.. the ironic part is that the very well documented ORDER BY method no longer works and the supposedly undocumented "quirky" update still does. Go figure.

I appologize for the inconvenience but, again, if you used the ORDER BY method, please immediately check your results and make sure that it still works like it did in SQL Server 2000. Even if you're still running in SQL Server 2000 and installed SQL Server 2005, the ORDER BY method may still have gone sour like it did on my machine.

Steve, can you make sure "this" warning replaces the current article? Thanks.

--Jeff Moden

Resources:

Solving running total and ordinal rank.sql

By Jeff Moden, 2008/01/31

Total article views: 10958 | Views in the last 30 days: 473
Your response
 
 
Related tags

Advanced Querying    
T-SQL    
 
 
Contribute

Free registration required...

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Login (existing users)

Login

Email:   Password:   Remember me: Forgotten your password?

Register (new users)

Register

Email:   Password:
Confirm:

Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

Steve Jones
Editor, SQLServerCentral.com