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 mverma4you
»
SELECT FUN
35 posts, Page 4 of 4
««
«
1
2
3
4
SELECT FUN
Rate Topic
Display Mode
Topic Options
Author
Message
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Tuesday, May 05, 2009 9:22 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436,
Visits: 13,751
When a question is ambiguous and I've (usually) been chastised properly by Hugo for letting it slip through, I correct the question and then award everyone who has answered to that time, a correct mark. With points added back.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #710361
Saurabh Dwivedy
Saurabh Dwivedy
Posted Thursday, May 07, 2009 9:10 PM
SSC-Addicted
Group: General Forum Members
Last Login: Thursday, January 05, 2012 2:05 AM
Points: 488,
Visits: 335
I got it wrong because I thought TWO NULL Values are NOT supposed to be same(identical). So I chose the option with 3 rows. Quirk of SQLServer?
Saurabh Dwivedy
___________________________________________________________
My Blog:
http://tinyurl.com/dwivedys
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537
Be Happy!
Post #712575
Hugo Kornelis
Hugo Kornelis
Posted Friday, May 08, 2009 2:12 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 3:21 AM
Points: 5,244,
Visits: 7,062
saurabh.dwivedy (5/7/2009)
I got it wrong because I thought TWO NULL Values are NOT supposed to be same(identical). So I chose the option with 3 rows. Quirk of SQLServer?
No quirk. Expected behaviour, as required by the ANSI standard.
NULL values are considered to yield "unknown" (not false!) on any comparison predicate, so they are neither equal nor unequal. But that does not apply here. This is a grouping operation, and the ANSI standard explicitly states that NULL values are considered to be not distinct for grouping purposes.
Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog:
http://sqlblog.com/blogs/hugo_kornelis
Post #712706
Saurabh Dwivedy
Saurabh Dwivedy
Posted Friday, May 08, 2009 2:20 AM
SSC-Addicted
Group: General Forum Members
Last Login: Thursday, January 05, 2012 2:05 AM
Points: 488,
Visits: 335
Hugo Kornelis (5/8/2009)
saurabh.dwivedy (5/7/2009)
I got it wrong because I thought TWO NULL Values are NOT supposed to be same(identical). So I chose the option with 3 rows. Quirk of SQLServer?
No quirk. Expected behaviour, as required by the ANSI standard.
NULL values are considered to yield "unknown" (not false!) on any comparison predicate, so they are neither equal nor unequal. But that does not apply here. This is a grouping operation, and the ANSI standard explicitly states that NULL values are considered to be not distinct for grouping purposes.
Thanks. Appreciate it.
Saurabh Dwivedy
___________________________________________________________
My Blog:
http://tinyurl.com/dwivedys
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537
Be Happy!
Post #712710
Abi Chapagai
Abi Chapagai
Posted Friday, December 24, 2010 8:47 AM
SSCommitted
Group: General Forum Members
Last Login: Sunday, May 19, 2013 10:45 AM
Points: 1,786,
Visits: 1,006
Hugo,
I agree with your points. I did select wrong answer but it is a good learning experience and i did not know that order by in UNION would make a difference. I had the impression that UNION would not take the nulls like UNION ALL. Thanks for the clarifying it.
Post #1039124
« Prev Topic
|
Next Topic »
35 posts, Page 4 of 4
««
«
1
2
3
4
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.