Interesting Row_Number() bug

Posted by Joel Coehoorn on Stack Overflow See other posts from Stack Overflow or by Joel Coehoorn
Published on 2010-06-10T16:51:45Z Indexed on 2010/06/10 17:02 UTC
Read the original article Hit count: 222

Filed under:
|

I was playing with the Stack Exchange Data Explorer and ran this query:
http://odata.stackexchange.com/stackoverflow/q/2828/rising-stars-top-50-users-ordered-on-rep-per-day

Notice down in the results, rows 11 and 12 have the same value and so are mis-numbered, even though the row_number() function takes the same order by parameter as the query.

I know the correct fix here is to specify an additional tie-breaker column in the order by clauses, but I'm more curious as to why/how the row_number() function returned different results on the same data?

If it makes a difference anywhere, this runs on Azure.

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about rownumber