Log in  ::  Register  ::  Not logged in

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

 Variant order 1 Rate Topic Display Mode Topic Options
Author
 Message
 Posted Tuesday, November 29, 2011 8:35 PM
 SSCertifiable Group: General Forum Members Last Login: Today @ 4:58 AM Points: 7,945, Visits: 8,366
 Comments posted to this topic are about the item Variant order 1 Tom'S iomadh doigh a th’ air cu a mharbhadh gun a thachdadh le ìme
Post #1213644
 Posted Tuesday, November 29, 2011 8:36 PM
 SSCertifiable Group: General Forum Members Last Login: Today @ 8:20 AM Points: 5,333, Visits: 21,996
 Rather simple question ..... If everything seems to be going well, you have obviously overlooked something. RonPlease help us, help you -before posting a question please read Before posting a performance problem please read
Post #1213645
 Posted Tuesday, November 29, 2011 10:06 PM
 SSCommitted Group: General Forum Members Last Login: Monday, September 30, 2013 12:48 AM Points: 1,896, Visits: 2,736
 even though x=y, and y=x, your case statement catered for the following result:`'v3 = v2'` and no where specifies v2=v3."None of the Above" should be correct as well. ----------------------------------------------Msg 8134, Level 16, State 1, Line 1Divide by zero error encountered.
Post #1213668
 Posted Tuesday, November 29, 2011 10:46 PM
 UDP Broadcaster Group: General Forum Members Last Login: Monday, September 30, 2013 1:01 AM Points: 1,437, Visits: 96
 I agreed! From the programming logic, "v2 = v3" could not be displayed! In fact, the right answer should be "None of the above". If the editor admit that it is a typo mistake, then both "v2 = v3" and "None of the above" should be correct in order to be fair.
Post #1213675
 Posted Tuesday, November 29, 2011 11:25 PM
 Hall of Fame Group: General Forum Members Last Login: Yesterday @ 2:21 PM Points: 3,917, Visits: 2,982
 TomThanks for a REALLY interesting QotD. I wish I came up with this one.
Post #1213682
 Posted Wednesday, November 30, 2011 1:33 AM
 Ten Centuries Group: General Forum Members Last Login: Wednesday, November 06, 2013 5:15 AM Points: 1,238, Visits: 1,366
 Nice question Tom.
Post #1213723
 Posted Wednesday, November 30, 2011 1:57 AM
 Old Hand Group: General Forum Members Last Login: Tuesday, March 05, 2013 3:34 AM Points: 384, Visits: 113
 Must say I agree with Henrico Bekker, the case statements at no point say v2 = v3, but rather v3 = v2. Whilst the mean the same thing, I agree that None of the Above should also be an applicable answer for those who are being pedantic.
Post #1213730
 Posted Wednesday, November 30, 2011 2:30 AM
 SSCrazy Group: General Forum Members Last Login: Today @ 7:17 AM Points: 2,358, Visits: 7,153
 Got it wrong because I believe it should say "v3 = v2" not "v2 = v3" Not a DBA, just trying to learnFor better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/If you litter your database queries with nolock query hints, are you aware of the side effects?Try reading a few of these links...(*) Missing rows with nolock(*) Allocation order scans with nolock(*) Consistency issues with nolock(*) Transient Corruption Errors in SQL Server error log caused by nolock(*) Dirty reads, read errors, reading rows twice and missing rows with nolockLinkedIn | Blog coming soon (for sufficiently large values of "soon" )!
Post #1213745
 Posted Wednesday, November 30, 2011 2:31 AM
 SSC-Enthusiastic Group: General Forum Members Last Login: Sunday, November 24, 2013 5:15 AM Points: 147, Visits: 18
 Answer is v1 > v2 v1 > v3 v3 = v2 v4 > v1and not "v1 > v2 v1 > v3 v2 = v3 v4 > v1"
Post #1213747
 Posted Wednesday, November 30, 2011 3:20 AM
 Ten Centuries Group: General Forum Members Last Login: Friday, December 06, 2013 8:07 AM Points: 1,253, Visits: 13,537
 good question and explanation!!!!thanks Tom!!! rfr.ferrariDBA - SQL Server 2008MCITP | MCTS remember is live or suffer twice!
Post #1213771

 Permissions