<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SQL Server NULL values and &quot;Order By&quot; order</title>
	<atom:link href="http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html</link>
	<description>Productive software development using ASP.NET, C#, Adobe Flex, and other technologies and tools.</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:52:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Reydmon</title>
		<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/comment-page-1#comment-1914</link>
		<dc:creator>Reydmon</dc:creator>
		<pubDate>Thu, 29 Sep 2011 00:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html#comment-1914</guid>
		<description>@bp said

And.. what happens when the column is not numeric??
or when is a result of a subquery

the Jason&#039;s solution works!!! in any case :)</description>
		<content:encoded><![CDATA[<p>@bp said</p>
<p>And.. what happens when the column is not numeric??<br />
or when is a result of a subquery</p>
<p>the Jason&#8217;s solution works!!! in any case <img src='http://www.ytechie.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Mills</title>
		<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/comment-page-1#comment-1910</link>
		<dc:creator>Anthony Mills</dc:creator>
		<pubDate>Thu, 22 Sep 2011 19:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html#comment-1910</guid>
		<description>Excellent idea bp!

SELECT rank
FROM table
ORDER BY -rank DESC

Yeah, if you order by negative rank descending, you get the normal sort but with nulls at the end.</description>
		<content:encoded><![CDATA[<p>Excellent idea bp!</p>
<p>SELECT rank<br />
FROM table<br />
ORDER BY -rank DESC</p>
<p>Yeah, if you order by negative rank descending, you get the normal sort but with nulls at the end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bp</title>
		<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/comment-page-1#comment-1817</link>
		<dc:creator>bp</dc:creator>
		<pubDate>Sun, 16 Jan 2011 22:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html#comment-1817</guid>
		<description>How about..

SELECT rank
FROM blah
ORDER by rank * -1</description>
		<content:encoded><![CDATA[<p>How about..</p>
<p>SELECT rank<br />
FROM blah<br />
ORDER by rank * -1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cory</title>
		<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/comment-page-1#comment-1806</link>
		<dc:creator>Cory</dc:creator>
		<pubDate>Fri, 10 Dec 2010 18:39:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html#comment-1806</guid>
		<description>@Muhammad Atif Riaz:

Correction: SELECT rank
FROM blah
ORDER by rank desc

will give you following results

Rank
—-
3
2
1
null
null
null

Clearly there&#039;s a need for this &quot;complex solution&quot; and it works as intended.

Thanks Jason (and Tim)!</description>
		<content:encoded><![CDATA[<p>@Muhammad Atif Riaz:</p>
<p>Correction: SELECT rank<br />
FROM blah<br />
ORDER by rank desc</p>
<p>will give you following results</p>
<p>Rank<br />
—-<br />
3<br />
2<br />
1<br />
null<br />
null<br />
null</p>
<p>Clearly there&#8217;s a need for this &#8220;complex solution&#8221; and it works as intended.</p>
<p>Thanks Jason (and Tim)!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad Atif Riaz</title>
		<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/comment-page-1#comment-1805</link>
		<dc:creator>Muhammad Atif Riaz</dc:creator>
		<pubDate>Wed, 08 Dec 2010 11:41:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html#comment-1805</guid>
		<description>SELECT rank
FROM blah
ORDER by rank

will give you following results

Rank
----
null
null
null
1
2
3

and 

SELECT rank
FROM blah
ORDER by rank desc

will give you following results

Rank
----
1
2
3
null
null
null

why bother such complex solution</description>
		<content:encoded><![CDATA[<p>SELECT rank<br />
FROM blah<br />
ORDER by rank</p>
<p>will give you following results</p>
<p>Rank<br />
&#8212;-<br />
null<br />
null<br />
null<br />
1<br />
2<br />
3</p>
<p>and </p>
<p>SELECT rank<br />
FROM blah<br />
ORDER by rank desc</p>
<p>will give you following results</p>
<p>Rank<br />
&#8212;-<br />
1<br />
2<br />
3<br />
null<br />
null<br />
null</p>
<p>why bother such complex solution</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: V_OMAR</title>
		<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/comment-page-1#comment-1760</link>
		<dc:creator>V_OMAR</dc:creator>
		<pubDate>Tue, 21 Sep 2010 16:55:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html#comment-1760</guid>
		<description>Gracias por tu aporte me ayudo mucho</description>
		<content:encoded><![CDATA[<p>Gracias por tu aporte me ayudo mucho</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gints</title>
		<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/comment-page-1#comment-736</link>
		<dc:creator>Gints</dc:creator>
		<pubDate>Wed, 15 Oct 2008 13:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html#comment-736</guid>
		<description>SQL standard has NULLS FIRST / NULLS LAST syntax for that. Hopefully next version of SQL Server will implement that ;)</description>
		<content:encoded><![CDATA[<p>SQL standard has NULLS FIRST / NULLS LAST syntax for that. Hopefully next version of SQL Server will implement that <img src='http://www.ytechie.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andra P žurnāls - web izstrāde, pārlūku jaunumi, pamācības, programmas &#187; SQL kārtošana un NULL vērtības</title>
		<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/comment-page-1#comment-734</link>
		<dc:creator>Andra P žurnāls - web izstrāde, pārlūku jaunumi, pamācības, programmas &#187; SQL kārtošana un NULL vērtības</dc:creator>
		<pubDate>Tue, 14 Oct 2008 16:43:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html#comment-734</guid>
		<description>[...] Risinājuma oriģināls. [...]</description>
		<content:encoded><![CDATA[<p>[...] Risinājuma oriģināls. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ska</title>
		<link>http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html/comment-page-1#comment-622</link>
		<dc:creator>Ska</dc:creator>
		<pubDate>Fri, 08 Aug 2008 15:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.ytechie.com/2008/05/sql-server-null-values-and-order-by-order.html#comment-622</guid>
		<description>Thanks a lot for this Jason.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this Jason.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

