<?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 &#8211; Fix : ERROR : Msg 1033, Level 15, State 1 The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.</title>
	<atom:link href="http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:36:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Koen de Bes</title>
		<link>http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-204383</link>
		<dc:creator><![CDATA[Koen de Bes]]></dc:creator>
		<pubDate>Fri, 25 Nov 2011 15:10:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-204383</guid>
		<description><![CDATA[HERO!!!!!

I was looking the hole day for that solution! SELECT TOP 100 PERCENT  solved it for me]]></description>
		<content:encoded><![CDATA[<p>HERO!!!!!</p>
<p>I was looking the hole day for that solution! SELECT TOP 100 PERCENT  solved it for me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mitesh Darji</title>
		<link>http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-84311</link>
		<dc:creator><![CDATA[Mitesh Darji]]></dc:creator>
		<pubDate>Mon, 16 Aug 2010 15:41:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-84311</guid>
		<description><![CDATA[Hi Pinal,

My requirement is first execute Order By and after that get some records between them for Pagging.

Select  emp1.* from (
select * from emp order by username 
) as emp1 where emp1.empID &gt; 10 or emp1.empID &lt; 20


How Can I Do this ?

Thanks
Mitesh Darji]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>My requirement is first execute Order By and after that get some records between them for Pagging.</p>
<p>Select  emp1.* from (<br />
select * from emp order by username<br />
) as emp1 where emp1.empID &gt; 10 or emp1.empID &lt; 20</p>
<p>How Can I Do this ?</p>
<p>Thanks<br />
Mitesh Darji</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dar</title>
		<link>http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-56243</link>
		<dc:creator><![CDATA[Dar]]></dc:creator>
		<pubDate>Tue, 29 Sep 2009 13:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-56243</guid>
		<description><![CDATA[Can someone help mi with this my query. I have same error what you describe :

 id,
					 meter_id,
					 meter_serialnumber,
					 timestamp,
					 transponder_offset,
					 reading,
					 readingstatus_des,
					 consumer_firstname,
					 consumer_lastname,
					 transpondertype,
					 readingzone_zone,
					 readingzone_subzone,
					 meter_remark,]]></description>
		<content:encoded><![CDATA[<p>Can someone help mi with this my query. I have same error what you describe :</p>
<p> id,<br />
					 meter_id,<br />
					 meter_serialnumber,<br />
					 timestamp,<br />
					 transponder_offset,<br />
					 reading,<br />
					 readingstatus_des,<br />
					 consumer_firstname,<br />
					 consumer_lastname,<br />
					 transpondertype,<br />
					 readingzone_zone,<br />
					 readingzone_subzone,<br />
					 meter_remark,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DemoGeek</title>
		<link>http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-53923</link>
		<dc:creator><![CDATA[DemoGeek]]></dc:creator>
		<pubDate>Tue, 21 Jul 2009 14:40:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-53923</guid>
		<description><![CDATA[Example-2 really helped. Mine had all sort of pivots and stuffs and a bit more complicated but managed to get it working the way it is supposed with Example-2. Great!]]></description>
		<content:encoded><![CDATA[<p>Example-2 really helped. Mine had all sort of pivots and stuffs and a bit more complicated but managed to get it working the way it is supposed with Example-2. Great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Guidelines and Coding Standards Part - 2 Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-47506</link>
		<dc:creator><![CDATA[SQL SERVER - Guidelines and Coding Standards Part - 2 Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Thu, 26 Feb 2009 12:14:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-47506</guid>
		<description><![CDATA[[...] Incorporate your frequently required, complicated joins and calculations into a view so that you don&#8217;t have to repeat those joins/calculations in all your queries. Instead, just select from the view. (Read More Here) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Incorporate your frequently required, complicated joins and calculations into a view so that you don&#8217;t have to repeat those joins/calculations in all your queries. Instead, just select from the view. (Read More Here) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-7948</link>
		<dc:creator><![CDATA[Will]]></dc:creator>
		<pubDate>Thu, 16 Aug 2007 14:51:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/#comment-7948</guid>
		<description><![CDATA[It is worth mentioning that Method 1 will only work in SQL Server 2000 or SQL Server 2005 with a hotfix, traceflag and compatibility 80.  Granted, in 2005 in won&#039;t kick out an error when you use TOP (100) PERCENT ... ORDER BY but without the hotfix the query engine will actually ignore it and return the result unordered.

See KB 926292 for information on restoring the ORDER BY behavior that is present in SQL Server 2000]]></description>
		<content:encoded><![CDATA[<p>It is worth mentioning that Method 1 will only work in SQL Server 2000 or SQL Server 2005 with a hotfix, traceflag and compatibility 80.  Granted, in 2005 in won&#8217;t kick out an error when you use TOP (100) PERCENT &#8230; ORDER BY but without the hotfix the query engine will actually ignore it and return the result unordered.</p>
<p>See KB 926292 for information on restoring the ORDER BY behavior that is present in SQL Server 2000</p>
]]></content:encoded>
	</item>
</channel>
</rss>

