Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

Variant order 1 Expand / Collapse
Author
Message
Posted Tuesday, November 29, 2011 8:35 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 4:44 PM
Points: 8,286, Visits: 8,736
Comments posted to this topic are about the item Variant order 1

Tom
Post #1213644
Posted Tuesday, November 29, 2011 8:36 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:22 PM
Points: 5,471, Visits: 23,509
Rather simple question .....

If everything seems to be going well, you have obviously overlooked something.

Ron

Please 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

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 12:58 AM
Points: 1,904, Visits: 2,771
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 1
Divide by zero error encountered.
Post #1213668
Posted Tuesday, November 29, 2011 10:46 PM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Sunday, March 02, 2014 7:22 PM
Points: 1,497, Visits: 100
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


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 3:31 PM
Points: 4,244, Visits: 3,321
Tom

Thanks 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

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 2:08 AM
Points: 1,269, Visits: 1,400
Nice question Tom.
Post #1213723
Posted Wednesday, November 30, 2011 1:57 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld 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

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 7:06 AM
Points: 2,404, Visits: 7,311
Got it wrong because I believe it should say "v3 = v2" not "v2 = v3"


Not a DBA, just trying to learn

For 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 nolock


LinkedIn | Blog coming soon (for sufficiently large values of "soon" )!
Post #1213745
Posted Wednesday, November 30, 2011 2:31 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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 > v1
and not "v1 > v2 v1 > v3 v2 = v3 v4 > v1"
Post #1213747
Posted Wednesday, November 30, 2011 3:20 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 2:25 PM
Points: 1,253, Visits: 13,546
good question and explanation!!!!

thanks Tom!!!



rfr.ferrari
DBA - SQL Server 2008
MCITP | MCTS

remember is live or suffer twice!
Post #1213771
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse