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 ««12345»»»

CHOOSE - 1 Expand / Collapse
Author
Message
Posted Monday, January 28, 2013 2:52 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:12 AM
Points: 2,589, Visits: 2,444
raulggonzalez (1/28/2013)
I don't see what this QotD is trying to test... It's not about how CHOOSE works but what data you have in a table that is not represented on the question itself...

how can anybody come up with the right answer without executing the query (against the right db)??

obviously I didn't, I just followed the logic that of there are more months for winter and less for spring, those should've been the correct answers.

didn't like it.

+1

Post #1412284
Posted Monday, January 28, 2013 2:54 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:12 AM
Points: 2,589, Visits: 2,444
I know how CHOOSE works, but I do not want to know what the default data are for the table Employ!
Let's go!
Post #1412286
Posted Monday, January 28, 2013 3:16 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, November 6, 2014 5:01 AM
Points: 2,116, Visits: 6,441
Koen Verbeeck (1/28/2013)
Apparently, there are 4 winter months?
Anyway, I don't have AdventureWorks 2012 installed on this machine, so I had to guess. Quite a pity, because the idea of the question was good.


+1, exactly my sentiment. Shame, because it would have been a really good question.


--------------------------------------------------------------------------
A little knowledge is a dangerous thing (Alexander Pope)

In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)
Post #1412291
Posted Monday, January 28, 2013 4:07 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 3:54 PM
Points: 3,278, Visits: 3,551
Jan Van der Eecken (1/28/2013)
Koen Verbeeck (1/28/2013)
Apparently, there are 4 winter months?
Anyway, I don't have AdventureWorks 2012 installed on this machine, so I had to guess. Quite a pity, because the idea of the question was good.


+1, exactly my sentiment. Shame, because it would have been a really good question.

Agree - good otherwise Ron


-------------------------------
Posting Data Etiquette - Jeff Moden
Smart way to ask a question

There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
Post #1412327
Posted Monday, January 28, 2013 4:09 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 3:56 PM
Points: 6,086, Visits: 8,354
Tough I applaud the effort to create questions on new SQL2012 functionality, I really see nothing positive about this question.

First, without AdventureWorks2012 it's impossible to answer the question. True, everyone can download that sample database - but if you doon't have SQL Server 2012, will it even install? I never tried, but I doubt it. And if you use an older version of AdventureWorks, you can't be sure that the data is identical.

Second, even with an AdventureWorks2012 database, it is still almost impossible to answer without running the code. There are 290 rows in the Employee table. Do you really expect me to go over them by hand and count the months from all the hiredate values?
And if I just run the code, it kind of defeats the purpose of learning about the Choose function.

Third, I don't understand the uneven distribution of months in the CHOOSE function. I know Ron long enough to trust that he didn't deliberately make this into a trick question, but it has turned out that way - with four months being assigned to winter and only two to spring, I am not surprised to see a high percentage of people choosing "most in winter / least in spring". If I had not had access to AdventureWorks (and hence been forced to guess), I would have picked that combination too, based on the season list in the CHOOSE function.

This question would have been so much better if it had been based on a much lower number of rows that were included in the question (so that you could just count the results by hand). Lost opportunity - too bad!



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1412329
Posted Monday, January 28, 2013 4:38 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 12:25 PM
Points: 634, Visits: 244
As someone who definitely tries to run through the question in my mind, and not against an actual database, I also agree that it would have been helpful if the question included the table data as well.
Post #1412344
Posted Monday, January 28, 2013 5:08 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 10:03 AM
Points: 1,895, Visits: 2,194
Koen Verbeeck (1/28/2013)
Apparently, there are 4 winter months?
Anyway, I don't have AdventureWorks 2012 installed on this machine, so I had to guess. Quite a pity, because the idea of the question was good.


However, if you try to answer the question within ten minutes of getting out of bed, you don't even notice that there are four months for Winter - at least I didn't. I wrongly assumed three for each, as my browser window was small and the end of the code line went off the page.

Then I just assumed an even distribution of employee hire dates. Understanding how CHOOSE works, I then correctly answered a question that wasn't asked.


Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Post #1412353
Posted Monday, January 28, 2013 5:41 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 30, 2014 7:38 AM
Points: 1,823, Visits: 904
I kept looking for a trick... something that wouldn't depend on the data itself that wasn't presented.
Post #1412370
Posted Monday, January 28, 2013 6:07 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, November 21, 2014 1:19 AM
Points: 846, Visits: 1,381
Ridiculous question as you have to know the content of a table in AdventureWorks 2012 to get the answer correct.



Ole Kristian Velstadbråten Bangås - Virinco - Facebook - Twitter

Concatenating Row Values in Transact-SQL
Post #1412383
Posted Monday, January 28, 2013 6:37 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 2:01 AM
Points: 1,372, Visits: 507
Hugo Kornelis (1/28/2013)
Tough I applaud the effort to create questions on new SQL2012 functionality, I really see nothing positive about this question.
...
This question would have been so much better if it had been based on a much lower number of rows that were included in the question (so that you could just count the results by hand). Lost opportunity - too bad!

+1
Post #1412400
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse