|
|
|
SSC-Dedicated
           
Group: Administrators
Last Login: Today @ 12:49 PM
Points: 31,432,
Visits: 13,742
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 11:10 AM
Points: 1,354,
Visits: 890
|
|
I read the first answer, knew it was right and ignored the rest. I don't see how doing nothing is an action
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 6:46 AM
Points: 5,102,
Visits: 20,207
|
|
Composed before I read Steve Jones post ....
Sorry about that Steve I should have hit the refresh before hitting post.
Scott Coleman How on earth can you claim "no changes" is an action that was executed?
Cliff Jones Yes, please explain the difference between answers 1 and 2 because it is very subtle
The action that was executed by the merge statement was the comparison between all the data in the table depts and all the data in table delta to determine if additional further action was required.
The objective of the QOD as I understand it is to get people thinking and learning. And the subtle actions of the merge is that all the rows in both tables are examined.
Scott Coleman I'm really getting tired of questions that play word games
Scott Coleman - how about you submitting a QOD. It is quite a challenge.
Edited at 11:20 AM
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please read Before posting a performance problem please read
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: 2 days ago @ 3:38 AM
Points: 812,
Visits: 1,134
|
|
I'm not trying to be difficult here but I have to disagree with you bitbucket.
If I write an update statement i get a response along the lines of
23 row(s) affected Your correct answer implies that what we should expect is
23 row(s) affected and 34 row(s) unaffected which isn't the case. If a row is untouched, as row 1 is, the fact it was untouched is implicit and needs no explanation as such. I appreciate it was an error that has now been corrected but trying to defend it by suggesting we missed a subtlty of the question rather than admitting that it was wrong is missing the objective of the QotW as much as you suggest we are.
Paul
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 8:48 AM
Points: 2,440,
Visits: 714
|
|
Excellent question.
First because it demonstrates the MERGE, Second because it illustrates the $action, and Last because the format for the output makes the answer particularly clear.
Specifically: INSERT 6 Production Jones NULL NULL NULL UPDATE 2 Sales Erickson 2 Sales Byham DELETE NULL NULL NULL 5 Manufacturing Brewer
Nice one!
Jamie
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, May 03, 2013 3:39 AM
Points: 857,
Visits: 584
|
|
Jamie Longstreet (8/21/2009) Excellent question.
First because it demonstrates the MERGE, Second because it illustrates the $action,
Nice one!
Actually, I was going to say much the same but got a bit sidetracked by the answer confusion... I didn't know about MERGE before but thanks to this QotD it's clear how it works and it will be most helpful in solving a problem I have at work without resorting to extra and less efficient processing.
Cheers!
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 6:46 AM
Points: 5,102,
Visits: 20,207
|
|
Jamie Longstreet (8/21/2009) -------------------------------------------------------------------------------- Excellent question.
First because it demonstrates the MERGE, Second because it illustrates the $action,
Nice one! dave.farmer
Actually, I was going to say much the same but got a bit sidetracked by the answer confusion... I didn't know about MERGE before but thanks to this QotD it's clear how it works and it will be most helpful in solving a problem I have at work without resorting to extra and less efficient processing.Cheers!
Thank you for your responses, it is satisfying to recieve affirmation that the QOD has achieved at least a portion of its objective.
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please read Before posting a performance problem please read
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Saturday, April 06, 2013 12:20 AM
Points: 649,
Visits: 263
|
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Friday, January 11, 2013 12:41 PM
Points: 621,
Visits: 297
|
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 12:49 PM
Points: 7,102,
Visits: 7,163
|
|
A nice question. I was lucky enough to see it after the wording was changed to reduce the number of correct answers to one.
But I do feel that this question illustrates how nasty MERGE is - we were better off without it, at least from the point of view of code clarity.
Tom Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|