Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


RANK - 1


RANK - 1

Author
Message
TomThomson
TomThomson
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10709 Visits: 12008
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

SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21075 Visits: 18259
Yippee skippee - thanks Ron.



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


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Andre Ranieri
Andre Ranieri
SSC-Addicted
SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)

Group: General Forum Members
Points: 499 Visits: 379
Thanks for the great question!

Andre Ranieri
asifkareem
asifkareem
SSChasing Mays
SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)

Group: General Forum Members
Points: 643 Visits: 151
Good And Easy One
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search