

Ten Centuries
Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,232,
Visits: 1,046





SSC Veteran
Group: General Forum Members
Last Login: Wednesday, January 22, 2014 12:48 PM
Points: 229,
Visits: 184


I accept I got it wrong, but what do you mean the second transaction fails? Only the insert null into the primary key field statement fails. There are no failed inserts on Table2.




SSChampion
Group: General Forum Members
Last Login: Today @ 3:15 PM
Points: 13,731,
Visits: 10,692





Hall of Fame
Group: General Forum Members
Last Login: Today @ 9:44 AM
Points: 3,959,
Visits: 5,194


The question itself is acceptable, but, in my opunion, the explanation is somewhat lacking.
____________________________________________ Space, the final frontier? not any more... All limits henceforth are selfimposed. “libera tute vulgaris ex”




Hall of Fame
Group: General Forum Members
Last Login: Friday, May 9, 2014 12:47 AM
Points: 3,448,
Visits: 4,407


No rows were inserted into table2? B not C is the correct answer? Terrible, terrible explanation




SSCrazy
Group: General Forum Members
Last Login: Today @ 12:53 AM
Points: 2,528,
Visits: 2,402





Ten Centuries
Group: General Forum Members
Last Login: Today @ 6:00 AM
Points: 1,009,
Visits: 863


I have to disagree with the answer. I ran the code on SQL server 2005 and got the following output:
a b c d 4 join1 4 join2 4 join1 4 join2 2 join3 2 one 2 join3 2 one 1 one NULL NULL NULL NULL NULL two NULL NULL NULL three
As I had worked out the same output before running and answering the question I decided that A, B, D and E could not possibly be correct so went for C as the only remaining option.
What have I missed?




SSChampion
Group: General Forum Members
Last Login: Today @ 3:15 PM
Points: 13,731,
Visits: 10,692


philip.cullingworth (12/20/2010)
I have to disagree with the answer. I ran the code on SQL server 2005 and got the following output: a b c d 4 join1 4 join2 4 join1 4 join2 2 join3 2 one 2 join3 2 one 1 one NULL NULL NULL NULL NULL two NULL NULL NULL three
As I had worked out the same output before running and answering the question I decided that A, B, D and E could not possibly be correct so went for C as the only remaining option. What have I missed?
Your output has 7 rows and the column d contains "three" for the 7th row, so it should be answer D.
How to post forum questions. Need an answer? No, you need a question. What’s the deal with Excel & SSIS?
Member of LinkedIn. My blog at LessThanDot. MCSA SQL Server 2012  MCSE Business Intelligence




Ten Centuries
Group: General Forum Members
Last Login: Today @ 6:00 AM
Points: 1,009,
Visits: 863


dazero (12/20/2010)
Your output has 7 rows and the column d contains "three" for the 7th row, so it should be answer D.
But Answer D is 7 rows where column d = three I only have 1 row where column d = three




SSCrazy
Group: General Forum Members
Last Login: Today @ 12:53 AM
Points: 2,528,
Visits: 2,402


philip.cullingworth (12/20/2010)
dazero (12/20/2010)
Your output has 7 rows and the column d contains "three" for the 7th row, so it should be answer D.But Answer D is 7 rows where column d = three I only have 1 row where column d = three Please, read carefully the question: it asks how many rows are in the results and what is the value of column "d" on the last row.



