How many Records are Returned?

  • Mike Is Here

    Hall of Fame

    Points: 3348

    Comments posted to this topic are about the item How many Records are Returned?

  • TomThomson

    SSC Guru

    Points: 104772

    Good question. Managed to get it wrong by not noticing that decimal wasn't decimal(7,2). Probably wouldn't have got it right even if I'd noticed.

    There seems to be something wrong with the percentage calculations in the result counts. with 4 answers so far we have 50% (2) wrong and 50% (2) right but for the individual selections 0,1,2,3,4 we have 0%,50%,0%,0%,25% which is crazy.

    Tom

  • Hugo Kornelis

    SSC Guru

    Points: 64675

    Got it wrong.

    I hate these questions where a declaration bad practice is buried under a heap of distracting code. I know that this happens in real code too, but when I find errors in real code, I at least get to run the queries. (Plus, I get paid for that).

    I prefer QotD's where the question is formulated such that the actual issue being tested is in plain sight, not buried below other fluff. But maybe that's just me?


    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/

  • Koen Verbeeck

    SSC Guru

    Points: 258955

    Thanks for the question.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • twin.devil

    SSC-Insane

    Points: 22208

    Nice question, good explanation.

  • PRAMANA.DBA

    SSCertifiable

    Points: 5507

    Good question.

  • pmadhavapeddi22

    SSCertifiable

    Points: 5306

    Why this question is worth 4 points ?:hehe:

  • Toreador

    SSChampion

    Points: 11248

    Had to guess whether it was a question about collation (no rows) or default data types (1 row), and luckily plumped for the right one 🙂

  • rhythmk

    SSCertifiable

    Points: 7162

    pmadhavapeddi22 (6/30/2014)


    Why this question is worth 4 points ?:hehe:

    +1

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

  • rhythmk

    SSCertifiable

    Points: 7162

    Interesting one.Thanks for question.

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

  • This was removed by the editor as SPAM

  • Mike Is Here

    Hall of Fame

    Points: 3348

    pmadhavapeddi22 (6/30/2014)


    Why this question is worth 4 points ?:hehe:

    Yeah I don't know, that wasn't my call.

  • Mike Is Here

    Hall of Fame

    Points: 3348

    Hugo Kornelis (6/29/2014)


    Got it wrong.

    I hate these questions where a declaration bad practice is buried under a heap of distracting code. I know that this happens in real code too, but when I find errors in real code, I at least get to run the queries. (Plus, I get paid for that).

    I prefer QotD's where the question is formulated such that the actual issue being tested is in plain sight, not buried below other fluff. But maybe that's just me?

    I hear you.

    This was a real live situation I was dealing with and after about 2 hours to solve it i thought "Hey this would make an interesting Qotd"

  • Marcia J

    SSCertifiable

    Points: 5649

    Clever question. Have to admit I got it wrong.

  • SQLRNNR

    SSC Guru

    Points: 281243

    Hugo Kornelis (6/29/2014)


    Got it wrong.

    I hate these questions where a declaration bad practice is buried under a heap of distracting code. I know that this happens in real code too, but when I find errors in real code, I at least get to run the queries. (Plus, I get paid for that).

    I prefer QotD's where the question is formulated such that the actual issue being tested is in plain sight, not buried below other fluff. But maybe that's just me?

    I think it was Paul White that said a similar thing. It might have even been on a question I submitted. I think I'd have to agree. Code parsing like this for a QotD can be cumbersome.

    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

Viewing 15 posts - 1 through 15 (of 23 total)

You must be logged in to reply to this topic. Login to reply