SELECT

  • (Bob Brown) (10/5/2012)


    bitbucket-25253 (10/5/2012)


    Hugo Kornelis (10/5/2012)


    kyliedude (10/5/2012)


    Give me my point!

    If points are that important for you, you can have one of mine. Heck, you can have all of mine. Last time I checked, the grocery still didn't accept my points as payment, and I also still haven't seen any job ads where SQLServerCentral points are a job requirement.

    Or, put differently: "loosen up, people!"

    +1,000,000

    Hugo thanks for putting these "points" in proper perspective.

    I agree that the point of QotD is not to amass points. Hopefully we learn a little something each day. I do think the point thing is fun. But I think if you ask a question and someone answers correctly, you should not say "You're wrong." The question should match the results.

    Point of QoTD , so whoever is looking for the points , there is actually a question in QoTD Humor section(I guess) which actually explains reason of QoTD ..it has 4 options .....

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

  • I want my point!

    The insert command fails.

    The first Select statements returns two rows.

    The second returns zero rows.

    ------------------------------------------------

    There is someone watching...

    I got my point, yeah ....:-D:-P

  • Please keep it in English!

    Ik begrijp deze tekst wel, maar een heleboel andere SQL-ers niet!

  • Actually it should be 2 points. If we have to debug the QofD, then there should be an extra point.

  • The answer you posted is wrong.

    You get 2 rows from your first select and 0 rows from your second select. The 0 rows is because of the error on your insert due to the NOT NULL but when you run your code in an SSMS window the results window will show the 0 rows in your second select. You most certainly do not get a 'ERROR' on the second select statement (which is all your question is asking about).

    It also shows in the messages...

    (1 row(s) affected) <From the first insert>

    (1 row(s) affected) <From the second insert>

    (2 row(s) affected) <From the first select>

    Msg 515, Level 16, State 2, Line 20

    Cannot insert the value NULL into column 'b', table '@b'; column does not allow nulls. INSERT fails.

    The statement has been terminated. <ERROR FROM INSERT>

    (0 row(s) affected) <From the second select>

  • Right, poster #627 to complain about the wording. With the little twist that I stared at it, thought I spotted the gotcha and said, "Aha! The batch returns an error, but the select returns 0 records. You can't fool me!" 😎

    Oops.

    😀

  • Good one, thank you for the question.

    For me when i saw the resultset, it was 2,0. but it gave error message due to not null constraint, so I chose the answer 2,E. (i guess 2,0 here represents that the execution is successful without error and still it is going to return 0 rows, but the case is it gives error and due to that the insert fails and the select has no rows to return, and it seems like 2,0 but the E is the the reason where no rows are displayed. so 2,E. )

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • I missed. :blink:

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

  • nice question,

    a tricky question with simple confusion 🙂

    Keep it up SKR V

    [font="Verdana"] There is no Wrong time to do a Right thing 🙂 [/font]

  • Tricky question ... was very close to missing it!

  • Aaargh - I hate these trick questions! I want to learn things, not have to look out for tricks in the wording of the question! :rolleyes:

  • Good question. Thanks for submitting.

    http://brittcluff.blogspot.com/

  • After long time I am attempting the question. Good tricky one !!!!.

Viewing 13 posts - 46 through 57 (of 57 total)

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