How many Records are Returned?

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

  • 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

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

  • 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

  • Nice question, good explanation.

  • Good question.

  • Why this question is worth 4 points ?:hehe:

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

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

  • 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

  • pmadhavapeddi22 (6/30/2014)


    Why this question is worth 4 points ?:hehe:

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

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

  • Clever question. Have to admit I got it wrong.

  • 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 22 total)

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