<?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: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>Mon, 29 Jun 2009 18:32:48 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Shannon</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-3901</link>
		<dc:creator>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>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>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>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>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>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>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>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>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>no way!

mysql is so quirky</description>
		<content:encoded><![CDATA[<p>no way!</p>
<p>mysql is so quirky</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-125</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Tue, 01 Jul 2008 16:09:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-125</guid>
		<description>I haven&#039;t tried that Rick. My guess is that it would partition the results but that it would fail to order by expected_at (for those records having a non-NULL expected_at).</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t tried that Rick. My guess is that it would partition the results but that it would fail to order by expected_at (for those records having a non-NULL expected_at).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-124</link>
		<dc:creator>Rick</dc:creator>
		<pubDate>Tue, 01 Jul 2008 04:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-124</guid>
		<description>What about this?

ORDER BY (expected_at IS NOT NULL)</description>
		<content:encoded><![CDATA[<p>What about this?</p>
<p>ORDER BY (expected_at IS NOT NULL)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lucas reddinger</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-123</link>
		<dc:creator>lucas reddinger</dc:creator>
		<pubDate>Wed, 18 Jul 2007 17:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-123</guid>
		<description>thanks a lot! great solution!</description>
		<content:encoded><![CDATA[<p>thanks a lot! great solution!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cuentos Web</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-122</link>
		<dc:creator>Cuentos Web</dc:creator>
		<pubDate>Thu, 14 Jun 2007 00:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-122</guid>
		<description>[...] http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/Â  [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/Â " rel="nofollow">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/Â </a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Burcham</title>
		<link>http://memerocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-121</link>
		<dc:creator>Bill Burcham</dc:creator>
		<pubDate>Wed, 06 Dec 2006 05:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2006/12/02/put-nulls-last-on-mysql/#comment-121</guid>
		<description>Yeah, I&#039;ve heard those rumblings.  Do the new paginators handle the sorting issues or is it still up to the user to provide the sorted objects?</description>
		<content:encoded><![CDATA[<p>Yeah, I&#8217;ve heard those rumblings.  Do the new paginators handle the sorting issues or is it still up to the user to provide the sorted objects?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
