<?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: Elegant pagination with MS SQL 2005</title>
	<atom:link href="http://www.stillnetstudios.com/pagination-mssql-2005/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stillnetstudios.com/pagination-mssql-2005/</link>
	<description>Web development notes and commentary from Ryan Stille</description>
	<lastBuildDate>Fri, 30 Jul 2010 20:41:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Spencer</title>
		<link>http://www.stillnetstudios.com/pagination-mssql-2005/comment-page-1/#comment-1220</link>
		<dc:creator>Spencer</dc:creator>
		<pubDate>Fri, 19 Mar 2010 20:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/?p=188#comment-1220</guid>
		<description>This saved my life.&#160;&#160;Thanks!</description>
		<content:encoded><![CDATA[<p>This saved my life.&nbsp;&nbsp;Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.stillnetstudios.com/pagination-mssql-2005/comment-page-1/#comment-1024</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sun, 24 Jan 2010 03:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/?p=188#comment-1024</guid>
		<description>Thanks Andrew, I&#039;ve updated the example code to include the second order by.</description>
		<content:encoded><![CDATA[<p>Thanks Andrew, I&#039;ve updated the example code to include the second order by.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Duvall</title>
		<link>http://www.stillnetstudios.com/pagination-mssql-2005/comment-page-1/#comment-1016</link>
		<dc:creator>Andrew Duvall</dc:creator>
		<pubDate>Fri, 22 Jan 2010 22:35:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/?p=188#comment-1016</guid>
		<description>I found this to be the best examples so far.&#160;&#160;However, when i put this in place i realized i was missing records when using the ORDER BY if not the default primary key.&#160;&#160;I found that in order to not exclude records that the ORDER BY needs to ALSO be on the last line as well.

example:

SELECT TOP 5 * FROM
&#160;&#160;&#160;&#160;(
&#160;&#160;&#160;&#160;SELECT&#160;&#160;ROW_NUMBER() OVER (ORDER BY Product_Name) AS RowNumber, *, TotalRows=Count(*) OVER()
&#160;&#160;&#160;&#160;FROM tbl_products
&#160;&#160;&#160;&#160;) _tmpInlineView
WHERE RowNumber &gt;= 5 ORDER BY Product_Name</description>
		<content:encoded><![CDATA[<p>I found this to be the best examples so far.&nbsp;&nbsp;However, when i put this in place i realized i was missing records when using the ORDER BY if not the default primary key.&nbsp;&nbsp;I found that in order to not exclude records that the ORDER BY needs to ALSO be on the last line as well.</p>
<p>example:</p>
<p>SELECT TOP 5 * FROM<br />
&nbsp;&nbsp;&nbsp;&nbsp;(<br />
&nbsp;&nbsp;&nbsp;&nbsp;SELECT&nbsp;&nbsp;ROW_NUMBER() OVER (ORDER BY Product_Name) AS RowNumber, *, TotalRows=Count(*) OVER()<br />
&nbsp;&nbsp;&nbsp;&nbsp;FROM tbl_products<br />
&nbsp;&nbsp;&nbsp;&nbsp;) _tmpInlineView<br />
WHERE RowNumber &gt;= 5 ORDER BY Product_Name</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robert</title>
		<link>http://www.stillnetstudios.com/pagination-mssql-2005/comment-page-1/#comment-461</link>
		<dc:creator>robert</dc:creator>
		<pubDate>Sat, 10 Jan 2009 15:07:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/?p=188#comment-461</guid>
		<description>It&#039;s a beauty! Thanks a lot!</description>
		<content:encoded><![CDATA[<p>It&#8217;s a beauty! Thanks a lot!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
