<?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; Interesting Observation &#8211; TOP 100 PERCENT and ORDER BY</title>
	<atom:link href="http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 21:45:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #005 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-384381</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #005 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 01 Dec 2012 01:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-384381</guid>
		<description><![CDATA[[...] Interesting Observation – TOP 100 PERCENT and ORDER BY If you pull up any application or system where there are more than 100 SQL Server Views are created &#8211; I am very confident that at one or two places you will notice the scenario wherein View the ORDER BY clause is used with TOP 100 PERCENT. SQL Server 2008 VIEW with ORDER BY clause does not throw an error; moreover, it does not acknowledge the presence of it as well. In this article we have taken three perfect examples and demonstrated which clause we should use when. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Interesting Observation – TOP 100 PERCENT and ORDER BY If you pull up any application or system where there are more than 100 SQL Server Views are created &#8211; I am very confident that at one or two places you will notice the scenario wherein View the ORDER BY clause is used with TOP 100 PERCENT. SQL Server 2008 VIEW with ORDER BY clause does not throw an error; moreover, it does not acknowledge the presence of it as well. In this article we have taken three perfect examples and demonstrated which clause we should use when. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #004 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-379688</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #004 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 24 Nov 2012 01:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-379688</guid>
		<description><![CDATA[[...] Interesting Observation – TOP 100 PERCENT and ORDER BY I have seen developers and DBAs using TOP very causally when they have to use the ORDER BY clause. Theoretically, there is no need of ORDER BY in the view at all. All the ordering should be done outside the view and view should just have the SELECT statement in it. It was quite common that to save this extra typing by including ordering inside of the view. At several instances developers want a complete resultset and for the same they include TOP 100 PERCENT along with ORDER BY, assuming that this will simulate the SELECT statement with ORDER BY. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Interesting Observation – TOP 100 PERCENT and ORDER BY I have seen developers and DBAs using TOP very causally when they have to use the ORDER BY clause. Theoretically, there is no need of ORDER BY in the view at all. All the ordering should be done outside the view and view should just have the SELECT statement in it. It was quite common that to save this extra typing by including ordering inside of the view. At several instances developers want a complete resultset and for the same they include TOP 100 PERCENT along with ORDER BY, assuming that this will simulate the SELECT statement with ORDER BY. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kk</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-350715</link>
		<dc:creator><![CDATA[kk]]></dc:creator>
		<pubDate>Wed, 19 Sep 2012 01:24:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-350715</guid>
		<description><![CDATA[Simple and nice explanation of TOP 100 + ORDER BY in view, which is useless for ordering.]]></description>
		<content:encoded><![CDATA[<p>Simple and nice explanation of TOP 100 + ORDER BY in view, which is useless for ordering.</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/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-350171</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:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-350171</guid>
		<description><![CDATA[[...] well it is ignored in our the query where the view is used. Here is the blog post on this subject: Interesting Observation – TOP 100 PERCENT and ORDER BY. Now when you create a new view in the SSMS and build a query with ORDER BY to avoid the error [...]]]></description>
		<content:encoded><![CDATA[<p>[...] well it is ignored in our the query where the view is used. Here is the blog post on this subject: Interesting Observation – TOP 100 PERCENT and ORDER BY. Now when you create a new view in the SSMS and build a query with ORDER BY to avoid the error [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shefalee</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-303198</link>
		<dc:creator><![CDATA[shefalee]]></dc:creator>
		<pubDate>Tue, 19 Jun 2012 13:06:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-303198</guid>
		<description><![CDATA[I didnt get how percent would be work from inside.
coz when i tried it using view there is no effect of order by 
so for what purpose we use it????]]></description>
		<content:encoded><![CDATA[<p>I didnt get how percent would be work from inside.<br />
coz when i tried it using view there is no effect of order by<br />
so for what purpose we use it????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: javari78</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-231310</link>
		<dc:creator><![CDATA[javari78]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 15:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-231310</guid>
		<description><![CDATA[In 2008 does it still work in stored procedures?]]></description>
		<content:encoded><![CDATA[<p>In 2008 does it still work in stored procedures?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-168088</link>
		<dc:creator><![CDATA[Tim]]></dc:creator>
		<pubDate>Wed, 14 Sep 2011 19:33:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-168088</guid>
		<description><![CDATA[Not sure about the hotfix, my workaround was (using Pinal&#039;s sample from above):

SELECT TOP 100 (select count(*) from HumanResources.Shift )  *
FROM HumanResources.Shift
ORDER BY ShiftID DESC]]></description>
		<content:encoded><![CDATA[<p>Not sure about the hotfix, my workaround was (using Pinal&#8217;s sample from above):</p>
<p>SELECT TOP 100 (select count(*) from HumanResources.Shift )  *<br />
FROM HumanResources.Shift<br />
ORDER BY ShiftID DESC</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohammad</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-99844</link>
		<dc:creator><![CDATA[Mohammad]]></dc:creator>
		<pubDate>Sun, 14 Nov 2010 22:46:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-99844</guid>
		<description><![CDATA[Hi all,

TOP 100 PERCENT doesn&#039;t work for me on SQL 2008 R2, so I have used TOP 99.99 PERCENT to fix the issue. 

Has anyone tried to install the Microsoft hotfix for this? 

Cheers :)
Mohammad]]></description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>TOP 100 PERCENT doesn&#8217;t work for me on SQL 2008 R2, so I have used TOP 99.99 PERCENT to fix the issue. </p>
<p>Has anyone tried to install the Microsoft hotfix for this? </p>
<p>Cheers :)<br />
Mohammad</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gue</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-85755</link>
		<dc:creator><![CDATA[gue]]></dc:creator>
		<pubDate>Tue, 31 Aug 2010 08:20:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-85755</guid>
		<description><![CDATA[Hi Mahboubeh,

Using TOP 99.99 PERCENT or large integer was producing another issue such as performance.


regards,

gue]]></description>
		<content:encoded><![CDATA[<p>Hi Mahboubeh,</p>
<p>Using TOP 99.99 PERCENT or large integer was producing another issue such as performance.</p>
<p>regards,</p>
<p>gue</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahboubeh</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-66850</link>
		<dc:creator><![CDATA[Mahboubeh]]></dc:creator>
		<pubDate>Mon, 26 Apr 2010 08:30:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-66850</guid>
		<description><![CDATA[Hi All,
You can use:  
 &quot; Top (99) Percent&quot; 
 or 

&quot;Top (200000000)&quot; I mean a large number that is 1000 times more than your selection records and be sure that all of your selection would be ruturned.
It works!
Just Try It.

:)

Best Regards, 
Mahboubeh J.]]></description>
		<content:encoded><![CDATA[<p>Hi All,<br />
You can use:<br />
 &#8221; Top (99) Percent&#8221;<br />
 or </p>
<p>&#8220;Top (200000000)&#8221; I mean a large number that is 1000 times more than your selection records and be sure that all of your selection would be ruturned.<br />
It works!<br />
Just Try It.</p>
<p>:)</p>
<p>Best Regards,<br />
Mahboubeh J.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Tkatch</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-59579</link>
		<dc:creator><![CDATA[Brian Tkatch]]></dc:creator>
		<pubDate>Mon, 11 Jan 2010 14:54:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-59579</guid>
		<description><![CDATA[@Probal Roy

To be emailed changed on a particular post, replay to this message, and check the option &quot;Notify me of new posts via email.&quot;.]]></description>
		<content:encoded><![CDATA[<p>@Probal Roy</p>
<p>To be emailed changed on a particular post, replay to this message, and check the option &#8220;Notify me of new posts via email.&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Probal Roy</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-59535</link>
		<dc:creator><![CDATA[Probal Roy]]></dc:creator>
		<pubDate>Sun, 10 Jan 2010 08:14:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-59535</guid>
		<description><![CDATA[Please notify me of new posts via email.]]></description>
		<content:encoded><![CDATA[<p>Please notify me of new posts via email.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-58065</link>
		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Tue, 01 Dec 2009 14:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-58065</guid>
		<description><![CDATA[This is not a bug; it was removed on purpose:

http://blogs.msdn.com/queryoptteam/archive/2006/03/24/560396.aspx

And there are workarounds, such as the following from Adam Machanic:

http://sqlblog.com/blogs/adam_machanic/archive/2006/10/03/exploring-the-secrets-of-intermediate-materialization.aspx]]></description>
		<content:encoded><![CDATA[<p>This is not a bug; it was removed on purpose:</p>
<p><a href="http://blogs.msdn.com/queryoptteam/archive/2006/03/24/560396.aspx" rel="nofollow">http://blogs.msdn.com/queryoptteam/archive/2006/03/24/560396.aspx</a></p>
<p>And there are workarounds, such as the following from Adam Machanic:</p>
<p><a href="http://sqlblog.com/blogs/adam_machanic/archive/2006/10/03/exploring-the-secrets-of-intermediate-materialization.aspx" rel="nofollow">http://sqlblog.com/blogs/adam_machanic/archive/2006/10/03/exploring-the-secrets-of-intermediate-materialization.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-57919</link>
		<dc:creator><![CDATA[Ray]]></dc:creator>
		<pubDate>Thu, 26 Nov 2009 04:21:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-57919</guid>
		<description><![CDATA[This is also a problem in SQL 2005]]></description>
		<content:encoded><![CDATA[<p>This is also a problem in SQL 2005</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-57860</link>
		<dc:creator><![CDATA[Ted]]></dc:creator>
		<pubDate>Tue, 24 Nov 2009 12:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-57860</guid>
		<description><![CDATA[This  was classified a bug by microsoft and has been fixed in a hot fix ( http://support.microsoft.com/kb/926292)  which was rolled up in Cumulative update package 1 for SQL Server 2008

http://support.microsoft.com/kb/956717/]]></description>
		<content:encoded><![CDATA[<p>This  was classified a bug by microsoft and has been fixed in a hot fix ( <a href="http://support.microsoft.com/kb/926292" rel="nofollow">http://support.microsoft.com/kb/926292</a>)  which was rolled up in Cumulative update package 1 for SQL Server 2008</p>
<p><a href="http://support.microsoft.com/kb/956717/" rel="nofollow">http://support.microsoft.com/kb/956717/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-57857</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Tue, 24 Nov 2009 12:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-57857</guid>
		<description><![CDATA[Hi Luciano,

This option will not work. Try following script out. It will not work. The whole behavior is not support with or without TIES.

CREATE VIEW vwShift_ties
AS 
SELECT TOP 100 PERCENT WITH TIES *
FROM HumanResources.Shift
ORDER BY ShiftID DESC
GO
-- Select From View
SELECT *
FROM vwShift_ties
GO

Kind Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Hi Luciano,</p>
<p>This option will not work. Try following script out. It will not work. The whole behavior is not support with or without TIES.</p>
<p>CREATE VIEW vwShift_ties<br />
AS<br />
SELECT TOP 100 PERCENT WITH TIES *<br />
FROM HumanResources.Shift<br />
ORDER BY ShiftID DESC<br />
GO<br />
&#8211; Select From View<br />
SELECT *<br />
FROM vwShift_ties<br />
GO</p>
<p>Kind Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luciano Evaristo Guerche (Gorše)</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-57856</link>
		<dc:creator><![CDATA[Luciano Evaristo Guerche (Gorše)]]></dc:creator>
		<pubDate>Tue, 24 Nov 2009 12:03:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-57856</guid>
		<description><![CDATA[Hi Pinal,

As far as I remember, when using &quot;TOP 100 PERCENT&quot; clause, one must include &quot;WITH TIES&quot; to assure all rows are returned (http://technet.microsoft.com/en-us/library/ms189463.aspx)

Regards,]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>As far as I remember, when using &#8220;TOP 100 PERCENT&#8221; clause, one must include &#8220;WITH TIES&#8221; to assure all rows are returned (<a href="http://technet.microsoft.com/en-us/library/ms189463.aspx" rel="nofollow">http://technet.microsoft.com/en-us/library/ms189463.aspx</a>)</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kalicharan</title>
		<link>http://blog.sqlauthority.com/2009/11/24/sql-server-interesting-observation-top-100-percent-and-order-by/#comment-57851</link>
		<dc:creator><![CDATA[Kalicharan]]></dc:creator>
		<pubDate>Tue, 24 Nov 2009 04:10:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7448#comment-57851</guid>
		<description><![CDATA[Hi Mr.Dave,

               Good Morning. I am new in sql 2008 before that i have 2 years experience in Sql 2000. I am working at Private concern as Software Engineer.
             
                In oracle we can create a JAVA class file and we can call that JAVA file in procedure, functions and packages also. My doubt is same like Can we create C# class file in Sql 2008. If possible pls explain if you have a time....


Bye

Thanks &amp; Regards
Kalicharan]]></description>
		<content:encoded><![CDATA[<p>Hi Mr.Dave,</p>
<p>               Good Morning. I am new in sql 2008 before that i have 2 years experience in Sql 2000. I am working at Private concern as Software Engineer.</p>
<p>                In oracle we can create a JAVA class file and we can call that JAVA file in procedure, functions and packages also. My doubt is same like Can we create C# class file in Sql 2008. If possible pls explain if you have a time&#8230;.</p>
<p>Bye</p>
<p>Thanks &amp; Regards<br />
Kalicharan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
