August 20, 2009 at 11:26 pm
Comments posted to this topic are about the item SQL 2008 T-SQL
August 21, 2009 at 3:51 am
I got my points, due to a lucky 50/50 guess. But I'd still like to know, what eexactly is the difference between
DeptId 2 data was updated,Deptid 5 row was deleted,A new Deptid of 6 was added
and
Deptid 1 no changes,DeptId 2 data was updated,Deptid 5 was deleted,A new Deptid of 6 was added
?
August 21, 2009 at 4:41 am
And I was the unlucky one who guessed the other way and got it wrong. Answers 1 and 2 are the same, but imo answer 1 is more correct, since the question asked
What actions were executed in/on the rows in the Depts table?
Since no actions were executed on row 1 it should have been omitted.
August 21, 2009 at 5:22 am
yeah, lucked out on getting it right, since both of those answers are technically correct.
August 21, 2009 at 6:50 am
Wrong here too - I spent a lot of time deciding between answer 1 and 2, and as Paul mentioned above, plumped for 1 as the question asked about actions and no action was taken with row 1 so it shouldn't be mentioned.
Of course I knew I'd be wrong. I seem to have the unenviable knack of choosing the wrong one whenever there are multiple correct answers, and every time I do, I vow to give up on these questions - and by the next day I'm back, getting the wrong right answer yet again! :-{
August 21, 2009 at 6:51 am
I think answer 1 is correct as well!
David
August 21, 2009 at 7:25 am
I just guessed. This one was way to much to think about.
August 21, 2009 at 8:05 am
Yes, please explain the difference between answers 1 and 2 because it is very subtle.
August 21, 2009 at 8:30 am
I agree... I got this one right, but I was torn between the equivacy of answer 1 and 2.
1 makes no mention of row 1, hence it is left alone.
2 distinctly states that nothing will happen to row 1... which equates to answer 1.
August 21, 2009 at 8:32 am
How on earth can you claim "no changes" is an action that was executed?
I'm really getting tired of questions that play word games.
August 21, 2009 at 9:12 am
I missed that subtlety with 1 and 2. I've changed the answers to clean things up and will award back points.
August 21, 2009 at 9:14 am
I read the first answer, knew it was right and ignored the rest. I don't see how doing nothing is an action
August 21, 2009 at 9:17 am
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
August 21, 2009 at 9:39 am
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
August 21, 2009 at 2:28 pm
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:
INSERT6ProductionJonesNULLNULLNULL
UPDATE2SalesErickson2SalesByham
DELETENULLNULLNULL5ManufacturingBrewer
Nice one!
Jamie
Viewing 15 posts - 1 through 15 (of 19 total)
You must be logged in to reply to this topic. Login to reply