SQL Server 2008 r2?

  • Yes, the question is repeated, but the size of the varchar variable and the possible answers are different. The real difference is the unclear wording of the answers.

  • Yeah, the way it is worded makes it seem like there are ONLY two correct answers, meaning that all the other answers are incorrect. I picked two answers that are correct, but got it wrong because I didn't pick the right correct answers :crazy:

  • I got it right.

    I saw the "VARCHAR(30)" change in the question right off the bat, but the answers are all messed up. I just picked the two that I figured expressed the point the author was trying to make.

    What does "dose" mean???

    ---------------
    Mel. 😎

  • Raghavendra Mudugal (8/27/2014)


    Carlo Romagnano (8/27/2014)


    What do you mean with "we can use print and exec commands in single query"?

    that word "query" is confusing... I guess he means in one "batch" or in one session (like we execute the some set of specific lines and then execute)..

    Well, He is not using it in the same statement so he must mean batch. So the answer is correct!

    ---------------
    Mel. 😎

  • The question asks, "What happens", yet one of the "correct" answers is that we need to change the variable and replicate lengths. At the risk of being pedantic, this correct answer is not "what happens" when you execute the query.

    I have to say that the question and answers are very poorly thought out.

  • Would help if this was written in English...

  • +1

  • More than 2 correct answers.

    And the explanation of what is correct isn't even true.

    Shiva says you get the syntax error because the table name is longer than a max table name. But you don't. Your create table string gets truncated to one that specifies no columns, which is incorrect syntax. You only get the table name length being a problem AFTER you fix the variable length.

  • gbritton1 (8/27/2014)


    The question asks, "What happens", yet one of the "correct" answers is that we need to change the variable and replicate lengths. At the risk of being pedantic, this correct answer is not "what happens" when you execute the query.

    I have to say that the question and answers are very poorly thought out.

    +1

    The original question for the QOTD is...

    If I execute this on SQL Server 2008 R2, what happens?

    Very simple - it fails! So only ONE correct answer is available...

    I know how difficult it is to provide QotD and it consumes lots of time for:

    - replay a given situation in my own box

    - word the correct question

    - underly the question with good coding (which is clear and without errors)

    - word an answer which forms an "educational" character and explains the solution in simple words

    This is all time consuming and - when I provide it - takes at least 30 min of work (I usually use 60 - 90 min for all).

    If a question will be submitted to blame answerers than it would be the best not to submit!

    What I am missing from the QOTD since a few weeks is - in some cases - a clear definied and well prepared question AND the approval of choices to answer. In some cases (and exactly this is one of them) I have the feeling that the primary intention of the authors is not the transfer of knowledge but seeing most of the people failing. I don't know why questions like this smell like pitfalls instead of "good" challenges!

    I would really appreciate a better quality management by the team of SCC!

    Steve, I know you are a busy man and I think your team is, too. But for the quality of QotD I hope you will take care of the quality of the questions and reject them if they are not clear enough!

    If you need assistance than let me know! It maybe possible for me to spent 2 - 3 hrs a week for quality checks :).

    If this will help the community to anser well asked challenges than it is worth the time!

    Microsoft Certified Master: SQL Server 2008
    MVP - Data Platform (2013 - ...)
    my blog: http://www.sqlmaster.de (german only!)

  • Mighty (8/27/2014)


    Not sure I see 4 correct answers (taking the "only" part of the first answer strict, so that any size other than 116 would not work), but 3 correct answers at least.

    The option the print and execute command can be used in one query is correct according to me. First it is unclear what is meant by "one query". But besides that, the following code works, so it proves this option should be seen as correct.

    EXEC('PRINT ''also works''')

    Yes, should be :w00t:

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • chris.pollock (8/27/2014)


    Would help if this was written in English...

    😀

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • I understand what you were going for, but the wording was way off.

    Do not ask "what happens" when the correct answers is "how to fix"

    "Useless code example in table variable is not executed" might have been a good candidate for a better second answer.

  • gbritton1 (8/27/2014)


    The question asks, "What happens", yet one of the "correct" answers is that we need to change the variable and replicate lengths. At the risk of being pedantic, this correct answer is not "what happens" when you execute the query.

    I have to say that the question and answers are very poorly thought out.

    100 % agree on this 😉

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Ed Wagner (8/27/2014)


    Yes, the question is repeated, but the size of the varchar variable and the possible answers are different. The real difference is the unclear wording of the answers.

    +1

  • Really???? Wow, got it wrong but my answer was right.

    Like please answer this true and false question:

    The QOD and the answer for today was strange.

    Answers(Please Select Two):

    True

    False

    All the above

    only F

    All the below

    🙂

    Not all gray hairs are Dinosaurs!

Viewing 15 posts - 16 through 30 (of 39 total)

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