<?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="/pagination-mssql-2005/feed/" rel="self" type="application/rss+xml" />
	<link>/pagination-mssql-2005/</link>
	<description>Web development notes and commentary from Ryan Stille</description>
	<lastBuildDate>Tue, 28 May 2013 22:20:33 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
	<item>
		<title>
		By: Mike Henke		</title>
		<link>/pagination-mssql-2005/comment-page-1/#comment-3881</link>

		<dc:creator><![CDATA[Mike Henke]]></dc:creator>
		<pubDate>Tue, 28 May 2013 22:20:33 +0000</pubDate>
		<guid isPermaLink="false">/?p=188#comment-3881</guid>

					<description><![CDATA[Who is this guy?]]></description>
			<content:encoded><![CDATA[<p>Who is this guy?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: negablog		</title>
		<link>/pagination-mssql-2005/comment-page-1/#comment-3682</link>

		<dc:creator><![CDATA[negablog]]></dc:creator>
		<pubDate>Tue, 05 Feb 2013 09:44:04 +0000</pubDate>
		<guid isPermaLink="false">/?p=188#comment-3682</guid>

					<description><![CDATA[Great solution for getting total number of records using Count(*) Over(). The over() solves the purpose, without it aggregate function error will throw..
Thanks a lot for writting.]]></description>
			<content:encoded><![CDATA[<p>Great solution for getting total number of records using Count(*) Over(). The over() solves the purpose, without it aggregate function error will throw..<br />
Thanks a lot for writting.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Spencer		</title>
		<link>/pagination-mssql-2005/comment-page-1/#comment-1220</link>

		<dc:creator><![CDATA[Spencer]]></dc:creator>
		<pubDate>Fri, 19 Mar 2010 20:12:17 +0000</pubDate>
		<guid isPermaLink="false">/?p=188#comment-1220</guid>

					<description><![CDATA[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>/pagination-mssql-2005/comment-page-1/#comment-1024</link>

		<dc:creator><![CDATA[Ryan]]></dc:creator>
		<pubDate>Sun, 24 Jan 2010 03:13:31 +0000</pubDate>
		<guid isPermaLink="false">/?p=188#comment-1024</guid>

					<description><![CDATA[Thanks Andrew, I&amp;apos;ve updated the example code to include the second order by.]]></description>
			<content:encoded><![CDATA[<p>Thanks Andrew, I&apos;ve updated the example code to include the second order by.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andrew Duvall		</title>
		<link>/pagination-mssql-2005/comment-page-1/#comment-1016</link>

		<dc:creator><![CDATA[Andrew Duvall]]></dc:creator>
		<pubDate>Fri, 22 Jan 2010 22:35:02 +0000</pubDate>
		<guid isPermaLink="false">/?p=188#comment-1016</guid>

					<description><![CDATA[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 &#062;= 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>/pagination-mssql-2005/comment-page-1/#comment-461</link>

		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Sat, 10 Jan 2009 15:07:46 +0000</pubDate>
		<guid isPermaLink="false">/?p=188#comment-461</guid>

					<description><![CDATA[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>
