April 16, 2013 at 10:07 pm
Comments posted to this topic are about the item Row Constructor
April 16, 2013 at 11:06 pm
Really a very good question. Thanks
🙂
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
April 17, 2013 at 12:39 am
Thanks for the question
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
April 17, 2013 at 12:52 am
good one ...
thanks for the question
~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one :ermm:
April 17, 2013 at 12:52 am
A simple CROSS JOIN!
🙂
April 17, 2013 at 1:17 am
New thing to learn... 🙂
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
April 17, 2013 at 1:30 am
Good question. something different. I don't think ssc has many questions about row constructor.
--------------------------------------------------------------------------------------
Hai Ton
My Db4Breakfast blog.
April 17, 2013 at 2:21 am
Good question. Not perfect, though.
When I read the question in the daily newsletter, I expected the answer options to be "yes" or "no", and I was fully ready to reply "yes". But when I clicked through to the site, I was surprised to see the much longer answer options - and especially the inclusion of three of the returned values for the "yes" option. Technically, this makes both answer options wrong. The query will return six "name" values, not just the three included in the answer.
Luckily this did not cause me to pick the wrong answer, but I think the question would have been better if either no results at all were included in the answer, or all, or the answer had included words like "among others" or so.
This is not meant to slash the author, though. I do like the question, but I also wanted to share my ideas on how it could have been better still - I hope Chirag will continue to submit questions, and I hope they will be at least as good, if not better, as this one.
April 17, 2013 at 3:18 am
Neither answer is really correct. "Will it run succesfully" ? Doesn't this depend on what you are trying to do ? What could you possibly be trying to achieve with the code as written ?
April 17, 2013 at 4:37 am
This did not run on my 2005 system and there was no qualification about version
April 17, 2013 at 5:08 am
Hugo Kornelis (4/17/2013)
Good question. Not perfect, though.When I read the question in the daily newsletter, I expected the answer options to be "yes" or "no", and I was fully ready to reply "yes". But when I clicked through to the site, I was surprised to see the much longer answer options - and especially the inclusion of three of the returned values for the "yes" option. Technically, this makes both answer options wrong. The query will return six "name" values, not just the three included in the answer.
Luckily this did not cause me to pick the wrong answer, but I think the question would have been better if either no results at all were included in the answer, or all, or the answer had included words like "among others" or so.
This is not meant to slash the author, though. I do like the question, but I also wanted to share my ideas on how it could have been better still - I hope Chirag will continue to submit questions, and I hope they will be at least as good, if not better, as this one.
yes Hugo you are right there can be more answer option rather than this 'Yes' and 'No'
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
April 17, 2013 at 5:44 am
nice question...
Manik
You cannot get to the top by sitting on your bottom.
April 17, 2013 at 6:40 am
Nice one! 🙂
April 17, 2013 at 6:48 am
tom.w.brannon (4/17/2013)
This did not run on my 2005 system and there was no qualification about version
QotD's are assumed to be applicable to SQL Server versions still under general support (2008, 2008 R2, and 2012) unless otherwise specified.
April 17, 2013 at 7:50 am
Hugo Kornelis (4/17/2013)
Good question. Not perfect, though.longer answer options - and especially the inclusion of three of the returned values for the "yes" option. Technically, this makes both answer options wrong. The query will return six "name" values, not just the three included in the answer.
Luckily this did not cause me to pick the wrong answer, but I think the question would have been better if either no results at all were included in the answer, or all, or the answer had included words like "among others" or so.
I did pick the wrong answer based on the fact that there would be 6 results. I've never seen the values clause in the context of a derived table, but there is enough meaning in the syntax to assume that if it works at all it would yield a cross product.
tbh, these "not perfect" QotD generate good discussion. 🙂
Viewing 15 posts - 1 through 15 (of 30 total)
You must be logged in to reply to this topic. Login to reply