|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 1:10 PM
Points: 7,084,
Visits: 7,137
|
|
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 Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Today @ 1:07 PM
Points: 18,733,
Visits: 12,332
|
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 7:56 AM
Points: 277,
Visits: 200
|
|
Thanks for the great question!
Andre Ranieri
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Today @ 3:07 PM
Points: 606,
Visits: 136
|
|
|
|
|