<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Put NULLS Last on MySQL</title>
	<atom:link href="http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/</link>
	<description>Bill Burcham's Launch Platform</description>
	<lastBuildDate>Tue, 08 Nov 2011 17:50:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Trevor</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-4085</link>
		<dc:creator><![CDATA[Trevor]]></dc:creator>
		<pubDate>Thu, 02 Jun 2011 17:27:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-4085</guid>
		<description><![CDATA[Who would have thought just a minus sign on the column name would ignore null values! I did look for hours and tried all sorts of funky ways of doing it. Thank you for the simple and slick example!]]></description>
		<content:encoded><![CDATA[<p>Who would have thought just a minus sign on the column name would ignore null values! I did look for hours and tried all sorts of funky ways of doing it. Thank you for the simple and slick example!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-4082</link>
		<dc:creator><![CDATA[Lee]]></dc:creator>
		<pubDate>Tue, 05 Apr 2011 06:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-4082</guid>
		<description><![CDATA[Awesome! Thanks so much! Saved me hours, I&#039;m sure!]]></description>
		<content:encoded><![CDATA[<p>Awesome! Thanks so much! Saved me hours, I&#8217;m sure!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-3946</link>
		<dc:creator><![CDATA[Simon]]></dc:creator>
		<pubDate>Fri, 15 Jan 2010 14:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-3946</guid>
		<description><![CDATA[sweet dude thanks for that. saved me big time.]]></description>
		<content:encoded><![CDATA[<p>sweet dude thanks for that. saved me big time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michiel</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-3942</link>
		<dc:creator><![CDATA[Michiel]]></dc:creator>
		<pubDate>Mon, 21 Dec 2009 16:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-3942</guid>
		<description><![CDATA[Thanks Roman!!!

Can&#039;t believe mysql does not allow for easier control, but anyway, this seems to work.]]></description>
		<content:encoded><![CDATA[<p>Thanks Roman!!!</p>
<p>Can&#8217;t believe mysql does not allow for easier control, but anyway, this seems to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Ellis</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-3909</link>
		<dc:creator><![CDATA[Joe Ellis]]></dc:creator>
		<pubDate>Thu, 23 Jul 2009 09:55:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-3909</guid>
		<description><![CDATA[@Roman, that&#039;s a great tip as most of the solutions seem to only work when sorting ascending.  Yours, however, allows you to control both, but still keep the NULLs at the bottom regardless of sort type.]]></description>
		<content:encoded><![CDATA[<p>@Roman, that&#8217;s a great tip as most of the solutions seem to only work when sorting ascending.  Yours, however, allows you to control both, but still keep the NULLs at the bottom regardless of sort type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shannon</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-3901</link>
		<dc:creator><![CDATA[Shannon]]></dc:creator>
		<pubDate>Thu, 28 May 2009 17:07:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-3901</guid>
		<description><![CDATA[Thank you!]]></description>
		<content:encoded><![CDATA[<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bburcham</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-1018</link>
		<dc:creator><![CDATA[bburcham]]></dc:creator>
		<pubDate>Wed, 18 Mar 2009 17:19:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-1018</guid>
		<description><![CDATA[Oh good one Roman!]]></description>
		<content:encoded><![CDATA[<p>Oh good one Roman!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roman Kofman</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-1016</link>
		<dc:creator><![CDATA[Roman Kofman]]></dc:creator>
		<pubDate>Wed, 18 Mar 2009 16:43:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-1016</guid>
		<description><![CDATA[This should be more intuitive:

&lt;code&gt;:order =&gt; &quot;expected_at IS NULL ASC, expected_at&quot;&lt;/code&gt;

Essentially, (expected_at IS NULL) returns a 0 or 1, and the rows are sorted by that value. A secondary sort is then applied by the expected_at column, with the nulls staying where they are.]]></description>
		<content:encoded><![CDATA[<p>This should be more intuitive:</p>
<p><code>:order =&gt; "expected_at IS NULL ASC, expected_at"</code></p>
<p>Essentially, (expected_at IS NULL) returns a 0 or 1, and the rows are sorted by that value. A secondary sort is then applied by the expected_at column, with the nulls staying where they are.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank Wöckener</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-1005</link>
		<dc:creator><![CDATA[Frank Wöckener]]></dc:creator>
		<pubDate>Mon, 09 Feb 2009 18:51:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-1005</guid>
		<description><![CDATA[If I want to sort a model &quot;Project&quot; (belongs_to :person) by a foreign attribute:

Project.all(:include =&gt; &#039;person&#039;, :order =&gt; &#039;-people.sname DESC&#039;)

it doesn&#039;t throw an error but doesn&#039;t work either. BUT - when I do it like this:

Project.all(:include =&gt; &#039;person&#039;, :order =&gt; &#039;-people.sname DESC, people.sname ASC&#039;)

it magically works - nulls at the end. Very mysterious...]]></description>
		<content:encoded><![CDATA[<p>If I want to sort a model &#8220;Project&#8221; (belongs_to :person) by a foreign attribute:</p>
<p>Project.all(:include =&gt; &#8216;person&#8217;, :order =&gt; &#8216;-people.sname DESC&#8217;)</p>
<p>it doesn&#8217;t throw an error but doesn&#8217;t work either. BUT &#8211; when I do it like this:</p>
<p>Project.all(:include =&gt; &#8216;person&#8217;, :order =&gt; &#8216;-people.sname DESC, people.sname ASC&#8217;)</p>
<p>it magically works &#8211; nulls at the end. Very mysterious&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Economy</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-948</link>
		<dc:creator><![CDATA[Michael Economy]]></dc:creator>
		<pubDate>Fri, 12 Dec 2008 07:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-948</guid>
		<description><![CDATA[no way!

mysql is so quirky]]></description>
		<content:encoded><![CDATA[<p>no way!</p>
<p>mysql is so quirky</p>
]]></content:encoded>
	</item>
</channel>
</rss>

