Row Constructor

  • Comments posted to this topic are about the item Row Constructor

  • Really a very good question. Thanks

    🙂

    Thanks
    Vinay Kumar
    -----------------------------------------------------------------
    Keep Learning - Keep Growing !!!

  • 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

  • good one ...

    thanks for the question

    ~ demonfox
    ___________________________________________________________________
    Wondering what I would do next , when I am done with this one :ermm:

  • A simple CROSS JOIN!

    🙂

  • New thing to learn... 🙂

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • Good question. something different. I don't think ssc has many questions about row constructor.

    --------------------------------------------------------------------------------------
    Hai Ton
    My Db4Breakfast blog.

  • 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.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • 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 ?

  • This did not run on my 2005 system and there was no qualification about version

  • 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/

  • nice question...

    Manik
    You cannot get to the top by sitting on your bottom.

  • Nice one! 🙂

  • 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.

  • 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