|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, October 12, 2012 7:03 AM
Points: 249,
Visits: 224
|
|
I almost missed this because of the incorrect options available. Went with the least "non-correct" answer as done by other members. I think this question should be a bonus for those that missed it because of incorrect options given.
Kwex.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: 2 days ago @ 8:39 AM
Points: 1,602,
Visits: 1,084
|
|
Don't worry - you get a bonus point for complaining about it in here
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 7:38 AM
Points: 1,101,
Visits: 1,192
|
|
DugyC (6/7/2011)
honza.mf (6/7/2011)
WayneS (6/6/2011) Actually, none of those choices are correct. You get back 50 random GUID values. 1. NEWID() returns a random GUID (aka uniqueidentifier) 2. Select statement has no order by clause, so the results are random. 3. The GO 50 repeats that batch (since the last GO statement) 50 times (if in SSMS and the batch separator is set to "GO")
The answer annotated as correct ("50") is not correct... the results are 50 random GUID values. "50" is not returned. Now, if it was a select count(*), that would be different.Is it so hard to add the missing count? Be empathic a little  The "correct" answer is least non-correct. I concur with Wayne, I eliminated your "least non-correct" answers as I knew, had the batch worked, it would return a list of guids... therefore I went for an error condition and got it wrong. Normally I would agree with you regarding being "picky", but here the ambiguity was too deep.
The list of GUIDs was not in the list of possible answers. If you don't like to add count to the last query, just imagine some words like "GUIDs", "lines", or "items" after the numeric possibilities. And the answer is almost correct.
Other idea: Try to write your own QotD (I did) and make it bulletproof (first time I was far away of that).
See, understand, learn, try, use efficient © Dr.Plch
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 3:25 AM
Points: 493,
Visits: 562
|
|
I got that wrong due to the question being very vague.
However i do note that it must be hard to do this on a daily basis and get them perfect 100% of the time.
So on that note - i just want to say thanks to those who write questions for QotD
Dan
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 9:15 AM
Points: 1,564,
Visits: 768
|
|
paul.knibbs (6/7/2011) I agree with Wayne--I selected "50" because it was the least incorrect of the provided options, but the question (or the answers) could definitely have been clearer! I did this too, figuring it would be the best way to get over to the forum to see if other folks had the same issue with the question. I suppose it's a test of my telepathic ability to determine what was intended.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 5:51 AM
Points: 360,
Visits: 1,260
|
|
I agree with WayneS. And I have one more question - why do you ask about "the output of this batch"? As far as I can see there are 3 batches, separated by "GO". Am I missing something?
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 3:14 AM
Points: 1,160,
Visits: 726
|
|
honza.mf (6/7/2011)
DugyC (6/7/2011)
honza.mf (6/7/2011)
WayneS (6/6/2011) Actually, none of those choices are correct. You get back 50 random GUID values. 1. NEWID() returns a random GUID (aka uniqueidentifier) 2. Select statement has no order by clause, so the results are random. 3. The GO 50 repeats that batch (since the last GO statement) 50 times (if in SSMS and the batch separator is set to "GO")
The answer annotated as correct ("50") is not correct... the results are 50 random GUID values. "50" is not returned. Now, if it was a select count(*), that would be different.Is it so hard to add the missing count? Be empathic a little  The "correct" answer is least non-correct. I concur with Wayne, I eliminated your "least non-correct" answers as I knew, had the batch worked, it would return a list of guids... therefore I went for an error condition and got it wrong. Normally I would agree with you regarding being "picky", but here the ambiguity was too deep. The list of GUIDs was not in the list of possible answers. If you don't like to add count to the last query, just imagine some words like "GUIDs", "lines", or "items" after the numeric possibilities. And the answer is almost correct. Other idea: Try to write your own QotD (I did) and make it bulletproof (first time I was far away of that).
Yeesh! Somethings got your cage rattled 
I think I've made it perfectly clear that I'm on your side as much as I agree with Wayne... and I never slated the original post or the question, just explaining my confusion. That is all.
Chill pill
_____________________________________________________________________ "The difficult tasks we do immediately, the impossible takes a little longer"
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 12:56 PM
Points: 987,
Visits: 124
|
|
Just adding my two cents.
.02 GO
or maybe
GO .02
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 6:38 AM
Points: 1,326,
Visits: 420
|
|
I ran this on a 2005 box and got an insert error
Insert Error: Column name or number of supplied values does not match table definition. ** An error was encountered during execution of batch. Continuing.
Why was my result different from others
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 6:38 AM
Points: 1,326,
Visits: 420
|
|
| Never Mind, I had another table test in the db, nice.
|
|
|
|