Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Tom Thomson
»
Variant order 1
59 posts, Page 1 of 6
1
2
3
4
5
»
»»
Variant order 1
Rate Topic
Display Mode
Topic Options
Author
Message
L' Eomot Inversé
L' Eomot Inversé
Posted Tuesday, November 29, 2011 8:35 PM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 6:38 PM
Points: 7,077,
Visits: 7,116
Comments posted to this topic are about the item
Variant order 1
Tom
Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
Post #1213644
bitbucket-25253
bitbucket-25253
Posted Tuesday, November 29, 2011 8:36 PM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 9:21 AM
Points: 5,099,
Visits: 20,191
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
Henrico Bekker
Henrico Bekker
Posted Tuesday, November 29, 2011 10:06 PM
SSCommitted
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 2:24 AM
Points: 1,871,
Visits: 2,692
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
wloong
wloong
Posted Tuesday, November 29, 2011 10:46 PM
Ten Centuries
Group: General Forum Members
Last Login: Wednesday, March 27, 2013 8:05 PM
Points: 1,290,
Visits: 91
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
Revenant
Revenant
Posted Tuesday, November 29, 2011 11:25 PM
Hall of Fame
Group: General Forum Members
Last Login: 2 days ago @ 11:46 AM
Points: 3,448,
Visits: 2,522
Tom
Thanks for a REALLY interesting QotD. I wish I came up with this one.
Post #1213682
Tom Brown
Tom Brown
Posted Wednesday, November 30, 2011 1:33 AM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 5:16 AM
Points: 1,196,
Visits: 1,319
Nice question Tom.
Post #1213723
CaptainStu72
CaptainStu72
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
Cadavre
Cadavre
Posted Wednesday, November 30, 2011 2:30 AM
SSCrazy
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:16 AM
Points: 2,236,
Visits: 6,486
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
vinucool35
vinucool35
Posted Wednesday, November 30, 2011 2:31 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Wednesday, January 16, 2013 6:47 AM
Points: 147,
Visits: 16
Answer is v1 > v2 v1 > v3 v3 = v2 v4 > v1
and not "v1 > v2 v1 > v3 v2 = v3 v4 > v1"
Post #1213747
rfr.ferrari
rfr.ferrari
Posted Wednesday, November 30, 2011 3:20 AM
Ten Centuries
Group: General Forum Members
Last Login: Thursday, May 02, 2013 10:51 AM
Points: 1,219,
Visits: 13,507
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 »
59 posts, Page 1 of 6
1
2
3
4
5
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.