INSERT INTO

  • How many points do you lose for posting a question with the wrong answer? How about the sum of all the wrong answer. Can someone create a SQL statement to total all the wrong answers? :w00t:

  • sanbornd (9/14/2011)


    How many points do you lose for posting a question with the wrong answer? How about the sum of all the wrong answer.

    Good idea.

    But how many points should people lose for posting a "question is wrong" reply when dozens of people have already done exactly the same? Maybe one point per previous reply? 😉

  • I don't think that anyone should be penalized for createing a QOTD even if the answer is not totally correct. At least they were contributing to the SQL Server community.

    A lot of times I learn more from an incorrect QOTD by double checking my knowledge, which is the whole purpose of QOTD.

    If an incorrect QOTD is the worst thing to happen to me today, then I had a pretty good day.:-P

  • Carlo Romagnano (9/14/2011)


    Unfortunately, the editor to contribute with a question, sometime, changes the text both in the question and more often in the explanation. Yesterday, the explanation of "Unary & Aliases" was victim of this change. I think because of GREAT and LESS sign that are misinterpreted as html syntax.

    But today, I want back my points. The possible answeres were three.

    :laugh: Part of the game. Realising the question is wrong and interpolating which 'wrong' answer will give you the points.

  • William Vach (9/14/2011)


    I don't think that anyone should be penalized for createing a QOTD even if the answer is not totally correct. At least they were contributing to the SQL Server community.

    A lot of times I learn more from an incorrect QOTD by double checking my knowledge, which is the whole purpose of QOTD.

    If an incorrect QOTD is the worst thing to happen to me today, then I had a pretty good day.:-P

    Agreed.

    The point of the QOTD isn't about accumulating points, as much as it is an way to test, expand and sharpen your skill set. Free, bite-sized training.

    Thanks for the question bitbucket!

    -Dan B

  • this is just a bad question.

    Second select statement returns a count of 2

    This is plain wrong, and depending on how you read the answers about the inserts causing errors you could select or not select the instert into cuss2 either causing or not causing an error.

    i.e. because it doesn't say "The first insert does not cause an error", but says, "The insert causes an error", we don't even know which of the 3 inserts for the second table it means.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • hI,

    I cant know why, the first and second insert statemtns wont get inserted, the PK is not violated...

    So hte 1st select statemtn should give 2

    the next insert statement only 1 row should be inserted as Pk is violated by 2nd insert.

    so it should be 1 result for select statemnt.

    Regards,

    Sushant

    DBA

    West Indies

    Regards
    Sushant Kumar
    MCTS,MCP

  • Yet again the answers don't match the questions, so it is impossible to get right.

    Can SSC fix this one?

    ( I choose three answers, since the fourth correct answer is unavailable )

  • Again with the SQL that does not match a singel correct answer?

    I guess we are ALL just a bunch whiney losers today right? 😛

    ROFLMAO

  • SKYBVI (9/14/2011)


    hI,

    I cant know why, the first and second insert statemtns wont get inserted, the PK is not violated...

    Regards,

    Sushant

    DBA

    West Indies

    First insert fails becuase of the Commas seperating the inserts.

  • SanDroid (9/14/2011)


    SKYBVI (9/14/2011)


    hI,

    I cant know why, the first and second insert statemtns wont get inserted, the PK is not violated...

    Regards,

    Sushant

    DBA

    West Indies

    First insert fails becuase of the Commas seperating the inserts.

    Okk, i note that, but in that case, shouldn't the 1st insert statemnt run (before the 😉

    And also, in hte 2nd table, the PK is voilated in 2nd insert, so the select should give 1 as output??

    Please, correct me..

    Thanks.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • SKYBVI (9/14/2011)


    SanDroid (9/14/2011)


    SKYBVI (9/14/2011)


    hI,

    I cant know why, the first and second insert statemtns wont get inserted, the PK is not violated...

    First insert fails becuase of the Commas seperating the inserts.

    Okk, i note that, but in that case, shouldn't the 1st insert statemnt run (before the 😉

    And also, in hte 2nd table, the PK is voilated in 2nd insert, so the select should give 1 as output??

    First insert fails before ; since the batches are seperated by GO if fails at syntax mistake of having a , seperating them.

    You are correct about the 2nd insert should only give 1 as output.

    Please read all the other posts about this.

    Some members of this comunity say that questions like these help you learn more.

    Did you learn anything from answering the question, or did you learn from others helping you understand?

  • This QOtD didn't give you a chance for correct answer. It should be removed and answers should be disregarded.

  • SanDroid (9/14/2011)


    SKYBVI (9/14/2011)


    SanDroid (9/14/2011)


    SKYBVI (9/14/2011)


    hI,

    I cant know why, the first and second insert statemtns wont get inserted, the PK is not violated...

    First insert fails becuase of the Commas seperating the inserts.

    Okk, i note that, but in that case, shouldn't the 1st insert statemnt run (before the 😉

    And also, in hte 2nd table, the PK is voilated in 2nd insert, so the select should give 1 as output??

    First insert fails before ; since the batches are seperated by GO if fails at syntax mistake of having a , seperating them.

    You are correct about the 2nd insert should only give 1 as output.

    Please read all the other posts about this.

    Some members of this comunity say that questions like these help you learn more.

    Did you learn anything from answering the question, or did you learn from others helping you understand?

    Yes offcourse, i learnt from the question and you too,

    BUT

    Providing the right answers in questions,, should also be there as it creates a lot of doubt about our own abilites to solve.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • Another incorrect question; point please.

    The second insert; inserts one record before the PK violation. The second SELECT returns back one.

    So the answer is error, error, 0 & 1.

    Rob

Viewing 15 posts - 31 through 45 (of 122 total)

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