September 12, 2011 at 6:22 am
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
September 12, 2011 at 6:23 am
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
September 13, 2011 at 1:33 am
Nice one, thank you
Iulian
September 15, 2011 at 2:34 am
Nice question ... learnt something new about MERGE statements.
Was also surprised an Oct 14th question showed up about a month early!
Kwex.
October 14, 2011 at 5:56 am
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/
October 14, 2011 at 6:48 am
Nice easy question, especially because I did not have to answer it today 🙂
October 14, 2011 at 7:08 am
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
October 14, 2011 at 10:00 am
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
October 14, 2011 at 10:10 am
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:-DI 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
March 1, 2012 at 3:12 pm
Thanks for the great question on the MERGE Statement.
March 1, 2012 at 3:33 pm
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