Log in  ::  Register  ::  Not logged in

 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
 UDP Broadcaster Group: General Forum Members Last Login: Monday, November 28, 2016 7:32 AM Points: 1,439, Visits: 965
 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: Saturday, June 6, 2015 9:44 PM Points: 3,450, Visits: 4,408
 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 2, 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
 Hall of Fame Group: General Forum Members Last Login: Monday, November 28, 2016 1:13 AM Points: 3,367, Visits: 3,190
 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
 SSCoach Group: General Forum Members Last Login: Yesterday @ 6:23 AM Points: 15,499, Visits: 13,162
 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 SQLKover. 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 2, 2011 11:50 PM Points: 5, Visits: 7
 Thanks for that
Post #1037113
 Posted Monday, December 20, 2010 5:44 AM
 SSChasing Mays Group: General Forum Members Last Login: Friday, November 4, 2016 9:13 AM Points: 641, Visits: 664
 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
 Hall of Fame Group: General Forum Members Last Login: Yesterday @ 9:58 AM Points: 3,243, Visits: 2,782
 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
 Ten Centuries Group: General Forum Members Last Login: Wednesday, May 25, 2016 11:36 AM Points: 1,045, Visits: 996
 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,228, 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

 Copyright © 2002-2016 Redgate. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.