Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

RANK - 1 Expand / Collapse
Author
Message
Posted Monday, January 07, 2013 12:55 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 4:56 PM
Points: 8,271, Visits: 8,717
Hugo Kornelis (1/7/2013)
Tom, AdventureWorks is available in different flavors. Apparently, you downloaded and installed the case sensitive version, but there is a case insensitive version as well.

I think the question could have been shortened to simply present two queries, one with RANK() and one with DENSE_RANK(), and then ask which of the two could have produced the given output. That would have made it more clear that the reader should focus on the difference between those two functions.

That being said - I do like the question! Thanks, Ron!

Writing the question with the schema name in the same case as the schema name in the database would have been a smaller change that at least ensured that it worked for both flavours of adventureworks (assuming of course that it is the same in both flavours). I guess Ron wasn't aware of the case sensitive version, as I'm sure he would either have made sure his question worked for both versions or specified which version it worked for, because it's clear that he's usually meticulous about that sort if detail in his questions. If I'd been aware that it came in several versions, I would have made sure to have a case-insensitive one, as I dislike case-sensitive collations because they are a pain when one wants dictionary order.

I like the question too, apart from the one issue of the case of the schema name. It is a nice basic question about the two ranking functions.


Tom
Post #1403831
Posted Monday, January 07, 2013 1:13 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 6:50 PM
Points: 20,455, Visits: 14,074
Yippee skippee - thanks Ron.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1403842
Posted Monday, January 07, 2013 10:34 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, February 05, 2014 12:27 PM
Points: 287, Visits: 276
Thanks for the great question!

Andre Ranieri
Post #1403969
Posted Tuesday, January 15, 2013 1:14 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Wednesday, September 25, 2013 8:54 PM
Points: 606, Visits: 151
Good And Easy One
Post #1407453
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse