<?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: SQL SERVER – ORDER BY Does Not Work – Limitation of the Views Part 1</title>
	<atom:link href="http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Thu, 20 Jun 2013 06:37:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Yubie</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-496870</link>
		<dc:creator><![CDATA[Yubie]]></dc:creator>
		<pubDate>Tue, 11 Jun 2013 02:54:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-496870</guid>
		<description><![CDATA[Hello, great help this is.
I&#039;m currently learning in this whole database thing.
I noticed that the order by does work in view. But ascending order only.
As I just try with small data, I think it still looks allright.

Can someone confirm this?]]></description>
		<content:encoded><![CDATA[<p>Hello, great help this is.<br />
I&#8217;m currently learning in this whole database thing.<br />
I noticed that the order by does work in view. But ascending order only.<br />
As I just try with small data, I think it still looks allright.</p>
<p>Can someone confirm this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc Jellinek</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-448579</link>
		<dc:creator><![CDATA[Marc Jellinek]]></dc:creator>
		<pubDate>Tue, 02 Apr 2013 06:03:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-448579</guid>
		<description><![CDATA[Don&#039;t confuse &quot;valid&quot; for &quot;too many people are using it&quot;]]></description>
		<content:encoded><![CDATA[<p>Don&#8217;t confuse &#8220;valid&#8221; for &#8220;too many people are using it&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colson.anthony@scrippshealth.org</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-445545</link>
		<dc:creator><![CDATA[colson.anthony@scrippshealth.org]]></dc:creator>
		<pubDate>Wed, 27 Mar 2013 20:21:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-445545</guid>
		<description><![CDATA[BTW,

Microsoft apparently seems to think that using ORDER BY in views is valid.  I just saw that they put out a fix for ORDER BY not working in views...

http://support.microsoft.com/kb/926292]]></description>
		<content:encoded><![CDATA[<p>BTW,</p>
<p>Microsoft apparently seems to think that using ORDER BY in views is valid.  I just saw that they put out a fix for ORDER BY not working in views&#8230;</p>
<p><a href="http://support.microsoft.com/kb/926292" rel="nofollow">http://support.microsoft.com/kb/926292</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colson.anthony@scrippshealth.org</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-445543</link>
		<dc:creator><![CDATA[colson.anthony@scrippshealth.org]]></dc:creator>
		<pubDate>Wed, 27 Mar 2013 20:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-445543</guid>
		<description><![CDATA[Well, I guess I am the black sheep in the discussion.  First, I have been working with databases and SQL for over 25 years, going back to dBase.  In all this time I have never seen any problem theoretically (not addressing any performance issues here) of using ORDER BY in views and philosophically I see nothing wrong with it if that is what the writer wants.

My philosophy is that I see views as a presentation of data (a way of viewing the data) which involves lower level processing of data, sometimes simple in nature, sometimes more complicated.  Along these lines, I view the use of ORDER BY in views (in part) as a means of customer service so that a user of the view doesn&#039;t have to understand internals to determine how to sort.  For that matter, based on some of the discussion points previously mentioned, I could argue that the WHERE clause should also not be used in views...just let the user determine how they want to work the the data returned from the view.  In real life I don&#039;t support this and think WHERE clauses have a place in views, and in the same vein, so do ORDER BY clauses.

Also, sometimes I have wanted users to have a default view of something, which includes sorting.  This comes in handy so I (and others) don&#039;t have to take time to re-figure out how to sort the data each time we use the view for something.  And views are useful (addressing a previous user&#039;s question) because sometimes (when working with tools such as Access or InfoPath for example) complicated queries or SELECT statements cause problems and simplifying with a view is a slick and elegant solution.

So, while apparently I speak heresy according to some, I see nothing wrong with ORDER BY in views and was very annoyed and perplexed when I saw views which worked as expected in SQL 2000 not work in SQL 2008 when we [finally] upgraded.]]></description>
		<content:encoded><![CDATA[<p>Well, I guess I am the black sheep in the discussion.  First, I have been working with databases and SQL for over 25 years, going back to dBase.  In all this time I have never seen any problem theoretically (not addressing any performance issues here) of using ORDER BY in views and philosophically I see nothing wrong with it if that is what the writer wants.</p>
<p>My philosophy is that I see views as a presentation of data (a way of viewing the data) which involves lower level processing of data, sometimes simple in nature, sometimes more complicated.  Along these lines, I view the use of ORDER BY in views (in part) as a means of customer service so that a user of the view doesn&#8217;t have to understand internals to determine how to sort.  For that matter, based on some of the discussion points previously mentioned, I could argue that the WHERE clause should also not be used in views&#8230;just let the user determine how they want to work the the data returned from the view.  In real life I don&#8217;t support this and think WHERE clauses have a place in views, and in the same vein, so do ORDER BY clauses.</p>
<p>Also, sometimes I have wanted users to have a default view of something, which includes sorting.  This comes in handy so I (and others) don&#8217;t have to take time to re-figure out how to sort the data each time we use the view for something.  And views are useful (addressing a previous user&#8217;s question) because sometimes (when working with tools such as Access or InfoPath for example) complicated queries or SELECT statements cause problems and simplifying with a view is a slick and elegant solution.</p>
<p>So, while apparently I speak heresy according to some, I see nothing wrong with ORDER BY in views and was very annoyed and perplexed when I saw views which worked as expected in SQL 2000 not work in SQL 2008 when we [finally] upgraded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-427857</link>
		<dc:creator><![CDATA[anon]]></dc:creator>
		<pubDate>Tue, 26 Feb 2013 11:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-427857</guid>
		<description><![CDATA[You can link directly to a view using say ODBC to return just a recordset without using a select query. In this case you may want the order in the view.]]></description>
		<content:encoded><![CDATA[<p>You can link directly to a view using say ODBC to return just a recordset without using a select query. In this case you may want the order in the view.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hscode</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-416773</link>
		<dc:creator><![CDATA[hscode]]></dc:creator>
		<pubDate>Sat, 02 Feb 2013 13:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-416773</guid>
		<description><![CDATA[actually i need to confirm something.. whats the idea behind the hack of adding order by into the views query.. because as per my knowledge, while fetching data using views you can use order by in the query..

and if possible can someboday link me to the article of whats the use of views ? why its important and when its important ? because you can get the same result using query !! 

as per my knowledge views are for sharing data with 3rd party or something but m not sure about it.. i have googled about this but i never found simple and easy to understand information on this with little example.. hope to get reply from Mr. Pinal on this..

thanks
hs]]></description>
		<content:encoded><![CDATA[<p>actually i need to confirm something.. whats the idea behind the hack of adding order by into the views query.. because as per my knowledge, while fetching data using views you can use order by in the query..</p>
<p>and if possible can someboday link me to the article of whats the use of views ? why its important and when its important ? because you can get the same result using query !! </p>
<p>as per my knowledge views are for sharing data with 3rd party or something but m not sure about it.. i have googled about this but i never found simple and easy to understand information on this with little example.. hope to get reply from Mr. Pinal on this..</p>
<p>thanks<br />
hs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #008 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-397393</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #008 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 22 Dec 2012 01:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-397393</guid>
		<description><![CDATA[[...] ORDER BY Does Not Work – Limitation of the View 1 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] ORDER BY Does Not Work – Limitation of the View 1 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muirhec</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-392593</link>
		<dc:creator><![CDATA[Muirhec]]></dc:creator>
		<pubDate>Thu, 13 Dec 2012 16:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-392593</guid>
		<description><![CDATA[This resolved my issue:
 
CREATE VIEW vw_ViewLimit1
AS
SELECT TOP (select count(*) from Sales.SalesOrderDetail)  *
FROM Sales.SalesOrderDetail
ORDER BY SalesOrderDetailID DESC
GO
-- Select from view
SELECT *
FROM vw_ViewLimit1
GO


Muirhec]]></description>
		<content:encoded><![CDATA[<p>This resolved my issue:</p>
<p>CREATE VIEW vw_ViewLimit1<br />
AS<br />
SELECT TOP (select count(*) from Sales.SalesOrderDetail)  *<br />
FROM Sales.SalesOrderDetail<br />
ORDER BY SalesOrderDetailID DESC<br />
GO<br />
&#8211; Select from view<br />
SELECT *<br />
FROM vw_ViewLimit1<br />
GO</p>
<p>Muirhec</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manohar</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-352214</link>
		<dc:creator><![CDATA[manohar]]></dc:creator>
		<pubDate>Sun, 23 Sep 2012 04:35:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-352214</guid>
		<description><![CDATA[helpful]]></description>
		<content:encoded><![CDATA[<p>helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sanjaya</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-351331</link>
		<dc:creator><![CDATA[sanjaya]]></dc:creator>
		<pubDate>Thu, 20 Sep 2012 12:04:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-351331</guid>
		<description><![CDATA[Thanks,That’s great. i had same problem today. my view had a TOP 35000 in may Select statement. then it was working like order by clause. we have to omit TOP keyword from Views.
And this the first time I realize this issue.  
SELECT *
				FROM vw_AvailableLocations
				WHERE UPC= &#039;20612351&#039; AND Series= &#039;00245&#039; --- No returns


			
				
				View Querry
				SELECT   Top 35000 INV.Item as Item ,INV.BinLoc as BinLoc,INV.Series as Supplier ,ISNULL((INV.Qty-ISNULL(ALLO.RQty,0)),INV.Qty) AS freeQty,INV.Qty as iQty
					,UPC,Series
				FROM DirectDATAINE5.dbo.WSL_InvLocation AS INV
					
				LEFT JOIN (
							SELECT szItem,szBinLoc ,ISNULL(SUM(iReqQty),0)  AS RQty
							FROM .dbo.tblAllocatedLocations
							WHERE boolNUsed=0  AND boolCollected=0
							GROUP BY szItem,szBinLoc
					
				) AS ALLO
					ON(ALLO.szItem COLLATE DATABASE_DEFAULT  =INV.Item  COLLATE DATABASE_DEFAULT  AND ALLO.szBinLoc COLLATE DATABASE_DEFAULT  =INV.BinLoc COLLATE DATABASE_DEFAULT )

				LEFT JOIN (
							SELECT  ISNULL(1,0) AS Report,WL.szBinLoc,MA.szUPC,MA.szSeries FROM tblLocWsl AS  WL
							INNER JOIN 	dbo.tblJobsManifest AS MA
								ON(MA.iUid=WL.iUID)
							WHERE  boolResolve = 0
				) AS Rep
ON(INV.BinLoc COLLATE DATABASE_DEFAULT =Rep.szBinLoc  COLLATE DATABASE_DEFAULT AND INV.Series COLLATE DATABASE_DEFAULT =Rep.szSeries COLLATE DATABASE_DEFAULT AND INV.UPC COLLATE DATABASE_DEFAULT =Rep.szUPC COLLATE DATABASE_DEFAULT)


				WHERE INV.Qty&gt;0 AND ISNULL((INV.Qty-ISNULL(ALLO.RQty,0)),INV.Qty)&gt;0 --AND Modified&gt;&#039;2011-01-01 00:00:00.000&#039;  	
					--AND  SUBSTRING (INV.BinLoc,1,1) = &#039;A&#039;																						
					AND Report IS  NULL AND UPC= &#039;20612351&#039; AND Series= &#039;00245&#039;—-return Values]]></description>
		<content:encoded><![CDATA[<p>Thanks,That’s great. i had same problem today. my view had a TOP 35000 in may Select statement. then it was working like order by clause. we have to omit TOP keyword from Views.<br />
And this the first time I realize this issue.<br />
SELECT *<br />
				FROM vw_AvailableLocations<br />
				WHERE UPC= &#8217;20612351&#8242; AND Series= &#8217;00245&#8242; &#8212; No returns</p>
<p>				View Querry<br />
				SELECT   Top 35000 INV.Item as Item ,INV.BinLoc as BinLoc,INV.Series as Supplier ,ISNULL((INV.Qty-ISNULL(ALLO.RQty,0)),INV.Qty) AS freeQty,INV.Qty as iQty<br />
					,UPC,Series<br />
				FROM DirectDATAINE5.dbo.WSL_InvLocation AS INV</p>
<p>				LEFT JOIN (<br />
							SELECT szItem,szBinLoc ,ISNULL(SUM(iReqQty),0)  AS RQty<br />
							FROM .dbo.tblAllocatedLocations<br />
							WHERE boolNUsed=0  AND boolCollected=0<br />
							GROUP BY szItem,szBinLoc</p>
<p>				) AS ALLO<br />
					ON(ALLO.szItem COLLATE DATABASE_DEFAULT  =INV.Item  COLLATE DATABASE_DEFAULT  AND ALLO.szBinLoc COLLATE DATABASE_DEFAULT  =INV.BinLoc COLLATE DATABASE_DEFAULT )</p>
<p>				LEFT JOIN (<br />
							SELECT  ISNULL(1,0) AS Report,WL.szBinLoc,MA.szUPC,MA.szSeries FROM tblLocWsl AS  WL<br />
							INNER JOIN 	dbo.tblJobsManifest AS MA<br />
								ON(MA.iUid=WL.iUID)<br />
							WHERE  boolResolve = 0<br />
				) AS Rep<br />
ON(INV.BinLoc COLLATE DATABASE_DEFAULT =Rep.szBinLoc  COLLATE DATABASE_DEFAULT AND INV.Series COLLATE DATABASE_DEFAULT =Rep.szSeries COLLATE DATABASE_DEFAULT AND INV.UPC COLLATE DATABASE_DEFAULT =Rep.szUPC COLLATE DATABASE_DEFAULT)</p>
<p>				WHERE INV.Qty&gt;0 AND ISNULL((INV.Qty-ISNULL(ALLO.RQty,0)),INV.Qty)&gt;0 &#8211;AND Modified&gt;&#8217;2011-01-01 00:00:00.000&#8242;<br />
					&#8211;AND  SUBSTRING (INV.BinLoc,1,1) = &#8216;A&#8217;<br />
					AND Report IS  NULL AND UPC= &#8217;20612351&#8242; AND Series= &#8217;00245&#8242;—-return Values</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; SSMS Automatically Generates TOP (100) PERCENT in Query Designer &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-350172</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; SSMS Automatically Generates TOP (100) PERCENT in Query Designer &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Tue, 18 Sep 2012 01:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-350172</guid>
		<description><![CDATA[[...] avoid using it all together. Here is another blog post of mine which describes the same subject ORDER BY Does Not Work – Limitation of the Views Part 1. It is valid to use ORDER BY in a view if there is a clear business need of using TOP with any [...]]]></description>
		<content:encoded><![CDATA[<p>[...] avoid using it all together. Here is another blog post of mine which describes the same subject ORDER BY Does Not Work – Limitation of the Views Part 1. It is valid to use ORDER BY in a view if there is a clear business need of using TOP with any [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karthik</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-332799</link>
		<dc:creator><![CDATA[Karthik]]></dc:creator>
		<pubDate>Sat, 18 Aug 2012 10:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-332799</guid>
		<description><![CDATA[Thanks for the article. It really helped me understand why ORDER BY is not allowed inside a view.]]></description>
		<content:encoded><![CDATA[<p>Thanks for the article. It really helped me understand why ORDER BY is not allowed inside a view.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sara</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-305210</link>
		<dc:creator><![CDATA[Sara]]></dc:creator>
		<pubDate>Sun, 24 Jun 2012 15:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-305210</guid>
		<description><![CDATA[I just wanted to let you know that this was a bug in versions of SQL Server after SQL Server 2000. There are hotfixes that take care of this issue.

http://support.microsoft.com/kb/956717/

http://support.microsoft.com/kb/936305/]]></description>
		<content:encoded><![CDATA[<p>I just wanted to let you know that this was a bug in versions of SQL Server after SQL Server 2000. There are hotfixes that take care of this issue.</p>
<p><a href="http://support.microsoft.com/kb/956717/" rel="nofollow">http://support.microsoft.com/kb/956717/</a></p>
<p><a href="http://support.microsoft.com/kb/936305/" rel="nofollow">http://support.microsoft.com/kb/936305/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hammad</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-257977</link>
		<dc:creator><![CDATA[hammad]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 15:44:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-257977</guid>
		<description><![CDATA[It did not work for my for even 99 percent be work for 50 percent]]></description>
		<content:encoded><![CDATA[<p>It did not work for my for even 99 percent be work for 50 percent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-254431</link>
		<dc:creator><![CDATA[Andy]]></dc:creator>
		<pubDate>Mon, 20 Feb 2012 09:53:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-254431</guid>
		<description><![CDATA[Thanks for the article but I can&#039;t agree that a bug in SQL can be treated as &quot;well you shouldn&#039;t do that anyway&quot;. This IS a bug and has bee nresolved in a 2008 SP1. It also used to work fine in SQL 2000. There are many times you should be able to do this, for instance a view-on-a-view with an outer join and also with some third party reporting packages that require the data from a single view.
If it is not allowed then the view should NOT syntax check o.k. and be creatable.]]></description>
		<content:encoded><![CDATA[<p>Thanks for the article but I can&#8217;t agree that a bug in SQL can be treated as &#8220;well you shouldn&#8217;t do that anyway&#8221;. This IS a bug and has bee nresolved in a 2008 SP1. It also used to work fine in SQL 2000. There are many times you should be able to do this, for instance a view-on-a-view with an outer join and also with some third party reporting packages that require the data from a single view.<br />
If it is not allowed then the view should NOT syntax check o.k. and be creatable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laxmi</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-234506</link>
		<dc:creator><![CDATA[Laxmi]]></dc:creator>
		<pubDate>Tue, 10 Jan 2012 00:17:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-234506</guid>
		<description><![CDATA[Good Article Sir..]]></description>
		<content:encoded><![CDATA[<p>Good Article Sir..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laxmi</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-234504</link>
		<dc:creator><![CDATA[Laxmi]]></dc:creator>
		<pubDate>Tue, 10 Jan 2012 00:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-234504</guid>
		<description><![CDATA[good reasoning. Thank you.]]></description>
		<content:encoded><![CDATA[<p>good reasoning. Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joanne</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-230688</link>
		<dc:creator><![CDATA[Joanne]]></dc:creator>
		<pubDate>Tue, 03 Jan 2012 15:17:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-230688</guid>
		<description><![CDATA[Thank you! I couldn&#039;t figure out what I was doing wrong when my view sorted properly if I executed it in the &quot;modify&quot; window and not when when it was executed. You saved me a ton of time. I&#039;ll sort in the stored procedure.]]></description>
		<content:encoded><![CDATA[<p>Thank you! I couldn&#8217;t figure out what I was doing wrong when my view sorted properly if I executed it in the &#8220;modify&#8221; window and not when when it was executed. You saved me a ton of time. I&#8217;ll sort in the stored procedure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-218511</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 15 Dec 2011 14:22:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-218511</guid>
		<description><![CDATA[In this case the correct method is

select top 100 percent * FROM Sales.SalesOrderDetail
ORDER BY SalesOrderDetailID DESC]]></description>
		<content:encoded><![CDATA[<p>In this case the correct method is</p>
<p>select top 100 percent * FROM Sales.SalesOrderDetail<br />
ORDER BY SalesOrderDetailID DESC</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alucardcmcm</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-214162</link>
		<dc:creator><![CDATA[Alucardcmcm]]></dc:creator>
		<pubDate>Fri, 09 Dec 2011 18:13:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-214162</guid>
		<description><![CDATA[HI, i found your article very nice, and my friend and i suggest to create the view like this:

SELECT TOP (SELECT COUNT(*) FROM Sales.SalesOrderDetail) *
FROM Sales.SalesOrderDetail
ORDER BY SalesOrderDetailID DESC

And like that the result shows 100 percent of the rows.

Regards :)]]></description>
		<content:encoded><![CDATA[<p>HI, i found your article very nice, and my friend and i suggest to create the view like this:</p>
<p>SELECT TOP (SELECT COUNT(*) FROM Sales.SalesOrderDetail) *<br />
FROM Sales.SalesOrderDetail<br />
ORDER BY SalesOrderDetailID DESC</p>
<p>And like that the result shows 100 percent of the rows.</p>
<p>Regards :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Data Warehouseing Concepts – Day 20 of 31 Journey to SQLAuthority</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-149460</link>
		<dc:creator><![CDATA[SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Data Warehouseing Concepts – Day 20 of 31 Journey to SQLAuthority]]></dc:creator>
		<pubDate>Wed, 20 Jul 2011 01:31:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-149460</guid>
		<description><![CDATA[[...] (Read more here) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] (Read more here) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: saggi</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-125712</link>
		<dc:creator><![CDATA[saggi]]></dc:creator>
		<pubDate>Wed, 30 Mar 2011 20:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-125712</guid>
		<description><![CDATA[hi 

If you want to use order by in view without using TOP clause   use view with Schema 

as 


i have view from two table 

CREATE VIEW vw_saggi
AS


SELECT     dbo.Employees.FirstName, dbo.newt.LastName, dbo.Employees.EmployeeID
FROM         dbo.First_table CROSS JOIN dbo.Second_table order by   FirstName desc;

-----sort view using order by clause----------------------

SELECT * from dbo.vw_saggi 


order by   FirstName desc;
---------------------------------------------------------


try this 

Satwinder Saggi

DBA]]></description>
		<content:encoded><![CDATA[<p>hi </p>
<p>If you want to use order by in view without using TOP clause   use view with Schema </p>
<p>as </p>
<p>i have view from two table </p>
<p>CREATE VIEW vw_saggi<br />
AS</p>
<p>SELECT     dbo.Employees.FirstName, dbo.newt.LastName, dbo.Employees.EmployeeID<br />
FROM         dbo.First_table CROSS JOIN dbo.Second_table order by   FirstName desc;</p>
<p>&#8212;&#8211;sort view using order by clause&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>SELECT * from dbo.vw_saggi </p>
<p>order by   FirstName desc;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>try this </p>
<p>Satwinder Saggi</p>
<p>DBA</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandhya</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-124393</link>
		<dc:creator><![CDATA[Sandhya]]></dc:creator>
		<pubDate>Tue, 22 Mar 2011 13:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-124393</guid>
		<description><![CDATA[Very Good article. 

Thanks,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Very Good article. </p>
<p>Thanks,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Azhar Iqbal</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-97167</link>
		<dc:creator><![CDATA[Azhar Iqbal]]></dc:creator>
		<pubDate>Mon, 01 Nov 2010 12:08:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-97167</guid>
		<description><![CDATA[Nice Explanation dear Pinal]]></description>
		<content:encoded><![CDATA[<p>Nice Explanation dear Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/08/23/sql-server-order-by-does-not-work-limitation-of-the-views-part-1/#comment-97124</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 01 Nov 2010 08:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9773#comment-97124</guid>
		<description><![CDATA[It is not directly possible with a query. Try this procedure shown in this post
http://beyondrelational.com/blogs/madhivanan/archive/2007/08/27/generate-sql-script.aspx]]></description>
		<content:encoded><![CDATA[<p>It is not directly possible with a query. Try this procedure shown in this post<br />
<a href="http://beyondrelational.com/blogs/madhivanan/archive/2007/08/27/generate-sql-script.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2007/08/27/generate-sql-script.aspx</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
