

Ten Centuries
Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,228,
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: Yesterday @ 7:18 AM
Points: 14,250,
Visits: 12,235





SSCarpal Tunnel
Group: General Forum Members
Last Login: Yesterday @ 7:15 AM
Points: 4,368,
Visits: 5,762


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: Yesterday @ 7:04 AM
Points: 2,772,
Visits: 2,633





Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 1:18 AM
Points: 1,147,
Visits: 886


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: Yesterday @ 7:18 AM
Points: 14,250,
Visits: 12,235


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: Yesterday @ 1:18 AM
Points: 1,147,
Visits: 886


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: Yesterday @ 7:04 AM
Points: 2,772,
Visits: 2,633


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.



