Merge statement

  • srikanthms (9/8/2011)


    there is no prerequiste is defined for this question.

    such as procedure must be already created, UnitMeasure table to be created with production user etc.

    Because of this, this has to treated as invalid question.

    Nope, the script will fail on the construction of the MERGE statement, regardless if there is a CREATE PROC or ALTER PROC.

    However, the table Production.UnitMeasure table should exist. But if you looked at the answers given, you could easily deduce the right answer.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • palotaiarpad (9/9/2011)


    Actually the question was: what will the above code output: no right choice, alter procedure fails instantly.

    If you run the script on AdventureWorks2008R2, it is the constuction of the MERGE statement that fails, not the ALTER PROC.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Nice one, thank you

    Iulian

  • Nice question ... learnt something new about MERGE statements.

    Was also surprised an Oct 14th question showed up about a month early!

    Kwex.

  • A lot of comments about this being an easy question, wasn't that easy in my opinion. Thanks for submitting as I learned something today.

    http://brittcluff.blogspot.com/

  • Nice easy question, especially because I did not have to answer it today 🙂

  • SQLRNNR (9/7/2011)


    Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D

    I had forgotten about this question. So, I was a bit befuddled when I followed the QotD link and it said, "You got it right!", before I had even answered. Then I saw your post and remembered that I had answered this question last month when it first showed up.

    What a relief to know that I had not come unglued from this time stream. I just hate having to deal with all those time travel paradoxes. 😉

    [font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
    Connect to me on LinkedIn

  • Nice question!

    All this time travel has me a little freaked out. To everyone from September: Don't put your money on the Yankees in October!

    Chris Umbaugh
    Data Warehouse / Business Intelligence Consultant
    twitter @ToledoSQL

  • Thomas Abraham (10/14/2011)


    SQLRNNR (9/7/2011)


    Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D

    I had forgotten about this question. So, I was a bit befuddled when I followed the QotD link and it said, "You got it right!", before I had even answered. Then I saw your post and remembered that I had answered this question last month when it first showed up.

    What a relief to know that I had not come unglued from this time stream. I just hate having to deal with all those time travel paradoxes. 😉

    I had forgotten about this question too.

    Can we timewarp a few more of these questions?

    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

  • Thanks for the great question on the MERGE Statement.

  • Thanks for the great question on the MERGE Statement.

Viewing 11 posts - 16 through 25 (of 25 total)

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