|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 4:07 PM
Points: 1,943,
Visits: 8,227
|
|
ganotedp (11/23/2012) Why not DENSE_RANK instead of ROW_NUMBER?
Hi ganotedp,
The article does state
If there were ties and we wanted each of them treated the same then we would use the DENSE_RANK function rather than ROW_NUMBER. In some systems if there is a tie, for example two runners finished in exactly the same time for first place, then there is no following position. That means no second place runner and we skip to third. We would then use the RANK function. In our example, however, we are going to ignore the possibility of ties.
Clear Sky SQL My Blog Kent user group
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, March 20, 2013 10:54 PM
Points: 10,
Visits: 15
|
|
| Great article - especially the CROSS APPLY option. I've come across the need for this several times (although sadly have been constrained by SQL 2000, which doesn't work with either option).
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 8:22 AM
Points: 16,
Visits: 148
|
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Monday, April 15, 2013 11:42 PM
Points: 424,
Visits: 55
|
|
|
|
|