<?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: Views and Order By</title>
	<atom:link href="http://jes.blogs.shellprompt.net/2010/02/25/views-and-order-by/feed/" rel="self" type="application/rss+xml" />
	<link>http://jes.blogs.shellprompt.net/2010/02/25/views-and-order-by/</link>
	<description>My meandering thoughts about Oracle, Application Express and life in general</description>
	<lastBuildDate>Mon, 05 Sep 2011 05:48:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: Erik van Roon</title>
		<link>http://jes.blogs.shellprompt.net/2010/02/25/views-and-order-by/comment-page-1/#comment-485928</link>
		<dc:creator>Erik van Roon</dc:creator>
		<pubDate>Fri, 26 Feb 2010 22:57:01 +0000</pubDate>
		<guid isPermaLink="false">http://jes.blogs.shellprompt.net/?p=396#comment-485928</guid>
		<description>In my humble opinion a view should never, ever contain an order by, unless off course it&#039;s the order by clause of an analytical function.

Even if you have a clear and limited use for the view the moment you create it, you will simply not ever be able to guess all the uses other developers will think of in the (near) future.

Alltough an order by can be a technical demand for a use of the view it&#039;s still the demand for THAT specific use of the view. 
Like Martin pointed out, an order by is for presentation purposes.

So I think there&#039;s simply no excuse for order by in a view. It&#039;s for (very) lazy developers who do not want to type it with every query based on that view.</description>
		<content:encoded><![CDATA[<p>In my humble opinion a view should never, ever contain an order by, unless off course it&#8217;s the order by clause of an analytical function.</p>
<p>Even if you have a clear and limited use for the view the moment you create it, you will simply not ever be able to guess all the uses other developers will think of in the (near) future.</p>
<p>Alltough an order by can be a technical demand for a use of the view it&#8217;s still the demand for THAT specific use of the view.<br />
Like Martin pointed out, an order by is for presentation purposes.</p>
<p>So I think there&#8217;s simply no excuse for order by in a view. It&#8217;s for (very) lazy developers who do not want to type it with every query based on that view.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Wesley</title>
		<link>http://jes.blogs.shellprompt.net/2010/02/25/views-and-order-by/comment-page-1/#comment-485746</link>
		<dc:creator>Scott Wesley</dc:creator>
		<pubDate>Fri, 26 Feb 2010 04:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://jes.blogs.shellprompt.net/?p=396#comment-485746</guid>
		<description>Exactly what Martin said ;-)

Scott.</description>
		<content:encoded><![CDATA[<p>Exactly what Martin said ;-)</p>
<p>Scott.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Giffy D'Souza</title>
		<link>http://jes.blogs.shellprompt.net/2010/02/25/views-and-order-by/comment-page-1/#comment-485608</link>
		<dc:creator>Martin Giffy D'Souza</dc:creator>
		<pubDate>Thu, 25 Feb 2010 15:41:29 +0000</pubDate>
		<guid isPermaLink="false">http://jes.blogs.shellprompt.net/?p=396#comment-485608</guid>
		<description>Hi John,

I agree 100%. To me, views encapsulate the business logic. Order by is part of the presentation layer and shouldn&#039;t be placed in the view definition. 

Nice trick on the xmlgen!

Martin</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>I agree 100%. To me, views encapsulate the business logic. Order by is part of the presentation layer and shouldn&#8217;t be placed in the view definition. </p>
<p>Nice trick on the xmlgen!</p>
<p>Martin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Andrews</title>
		<link>http://jes.blogs.shellprompt.net/2010/02/25/views-and-order-by/comment-page-1/#comment-485566</link>
		<dc:creator>Tony Andrews</dc:creator>
		<pubDate>Thu, 25 Feb 2010 11:42:19 +0000</pubDate>
		<guid isPermaLink="false">http://jes.blogs.shellprompt.net/?p=396#comment-485566</guid>
		<description>John,

Totally agree with you; in fact I was dealing with such a case recently where a developer expected the view&#039;s ORDER BY clause to be honoured even when the query using it had a different ORDER BY!  I asked Tom Kyte for his views on this here:

http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2143982000346585885#2377754100346873409</description>
		<content:encoded><![CDATA[<p>John,</p>
<p>Totally agree with you; in fact I was dealing with such a case recently where a developer expected the view&#8217;s ORDER BY clause to be honoured even when the query using it had a different ORDER BY!  I asked Tom Kyte for his views on this here:</p>
<p><a href="http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2143982000346585885#2377754100346873409" rel="nofollow">http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2143982000346585885#2377754100346873409</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

