Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 NULL Values and Joins Rate Topic Display Mode Topic Options
Author
 Message
 Posted Monday, December 20, 2010 3:19 AM
 SSC Eights! Group: General Forum Members Last Login: Thursday, February 20, 2014 1:35 AM Points: 945, Visits: 834
 Carlo Romagnano (12/20/2010)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. That will teach me. I read the code and assumed what the actual question would be. Can I blame being up in the middle of the night defrosting water pipes?
Post #1037094
 Posted Monday, December 20, 2010 3:24 AM
 Hall of Fame Group: General Forum Members Last Login: Thursday, April 10, 2014 7:08 AM Points: 3,448, Visits: 4,406
 philip.cullingworth (12/20/2010)But Answer D is 7 rows where column d = threeI only have 1 row where column d = three I had read the answers several times before I realized there were some skipped words: "7 rows where [the value of] column d [in the last row] = three"
Post #1037095
 Posted Monday, December 20, 2010 3:53 AM
 Forum Newbie Group: General Forum Members Last Login: Sunday, January 02, 2011 11:50 PM Points: 5, Visits: 7
 I don't understand how the first transaction could succeed given the attempt to insert the null value into the not-null field "a". Also, why is the last insert of the second transaction, VALUES(2 ,'one'), invalid? Help, I'm confused.
Post #1037104
 Posted Monday, December 20, 2010 3:57 AM
 SSCrazy Group: General Forum Members Last Login: 2 days ago @ 3:30 AM Points: 2,389, Visits: 2,281
 ian.grace (12/20/2010)I don't understand how the first transaction could succeed given the attempt to insert the null value into the not-null field "a". Also, why is the last insert of the second transaction, VALUES(2 ,'one'), invalid? Help, I'm confused.As posted above by vk-kirov and others, the explanation is terrible with a lot of mistakes.
Post #1037106
 Posted Monday, December 20, 2010 4:06 AM
 SSChampion Group: General Forum Members Last Login: Today @ 2:44 PM Points: 12,180, Visits: 9,132
 ian.grace (12/20/2010)I don't understand how the first transaction could succeed given the attempt to insert the null value into the not-null field "a". Also, why is the last insert of the second transaction, VALUES(2 ,'one'), invalid? Help, I'm confused.The first transaction succeeds because it is an explicit transaction. Those will only fail if you explicitly issue a ROLLBACK statement, which isn't the case. Since a COMMIT was issued, the 2 other INSERTS in the transaction are committed to the database. 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
Post #1037108
 Posted Monday, December 20, 2010 4:14 AM
 Forum Newbie Group: General Forum Members Last Login: Sunday, January 02, 2011 11:50 PM Points: 5, Visits: 7
 Thanks for that
Post #1037113
 Posted Monday, December 20, 2010 5:44 AM
 SSC-Addicted Group: General Forum Members Last Login: Wednesday, April 09, 2014 3:10 AM Points: 469, Visits: 538
 so the correct answer should be: "7 rows where the last row's column d = three", not: "7 rows where column d = three", going by the way the question is phrased none of the answers are correct.
Post #1037133
 Posted Monday, December 20, 2010 6:11 AM
 SSCrazy Group: General Forum Members Last Login: Today @ 11:52 AM Points: 2,919, Visits: 2,511
 Good Monday morning question - math test and logic while clearing the cobwebs and trying to get my first cup of coffeeMade me think, question and reread. Steve JimmoSr DBA“If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan
Post #1037141
 Posted Monday, December 20, 2010 6:23 AM
 SSC Eights! Group: General Forum Members Last Login: 2 days ago @ 10:58 AM Points: 819, Visits: 832
 I'm completely confused by this explanation. Especially this part:However, since the last insert in the second Transaction was invalid, no rows were inserted into table2. So B not C is the correct answer.But D is given as the correct answer, and as far as I can tell, rows are inserted into table2. What am I missing?Ron -----a haiku...NULL is not zeroNULL is not an empty stringNULL is the unknown
Post #1037146
 Posted Monday, December 20, 2010 7:08 AM
 Ten Centuries Group: General Forum Members Last Login: Thursday, January 31, 2013 8:01 AM Points: 1,232, Visits: 1,046
 I agree that if you read the question the answer is obvious.However there is a HUGE typo in the explination... B not C is the Answer?Disapointing.
Post #1037171

 Permissions