That case filter

  • Tom.Thomson (7/27/2011)


    BenWard (7/27/2011)


    I know rowcount would have returned 5, my point was that Microsoft's developers themselves consider no results grid to equal 0 rows not null rows.

    I'm glad the MS developers got it right. 😛 Of course I agree with them and with you. And of course with Ninja's_RGR'us.

    In the UK it's taught to 5 and 6 year old children in infant school (I guess that's what USA calls grade 1 and grade 2 ?). They learn that an empty bag of beans contains 0 beans.

    So when they grow up and become DBAs, the really should realise that if a statement doesn't return any rows, it returns 0 rows.

    It's a pity some of the commenters on this topic apparently missed those early lessons on numbers and arithmetic. :w00t:

    lol nicely put 😀

    I think it's a case of how you view things. Personally, I see things in real life/english first and technical stuff second. The question was written in English, with some real life wording which prompted me to answer in real life/english.

    If you approach QotD seeing things in technical language first and real-life english second I can understand why you'd get stuck on semantics.

    The argument is, I suppose, that being given an empty bean bag is semantically different from not even having been given a bag at all. the result is the same either way, you have no beans.

    if you have no bean bag, and you are asked how many beans you have, the answer would be zero. if asked what was in your bean bag, the answer would be 'Error on line 1: variable $myBag has not been set'

    The question was however worded in the way of 'how many beans do you have' and not 'what is in your bean bag'. Therefore the answer WAS logically zero and not null or error anything else.

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • They learn that an empty bag of beans contains 0 beans.

    And kids in Australia learn pretty young the futility of trying to count the number of beans in a non-existent bag.

    If I hand you a box and ask "How many beans in this bag?", which answer is more correct: "There are no beans in that bag", "There are no beans in that box", or "That is a box, not a bag"?

    ROSCO

  • BenWard (7/27/2011)


    I know rowcount would have returned 5, my point was that Microsoft's developers themselves consider no results grid to equal 0 rows not null rows.

    And my point was that if the question had been "What do Microsoft's developers consider to be the number of rows returned by this query?" the answer 0 may have been more correct. But that was not the question.

    ROSCO

  • good one. but confusing

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

  • Danny Ocean (8/3/2011)


    good one. but confusing

    Glad it made you think... enjoyed the brain work out?

  • I think I misunderstood the question on this one. I ran the code and got 5 rows affected message so chose 5 as the answer.

Viewing 6 posts - 196 through 200 (of 200 total)

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