<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	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>Jwalin Khatri &#187; SQL Server 2000</title>
	<atom:link href="http://jwalin.wordpress.com/tag/sql-server-2000/feed/" rel="self" type="application/rss+xml" />
	<link>http://jwalin.wordpress.com</link>
	<description>Don't limit yourself</description>
	<lastBuildDate>Wed, 14 Oct 2009 18:29:15 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='jwalin.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/499eff1ef6b26c8546dbe7bd01c0ac6c?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Jwalin Khatri &#187; SQL Server 2000</title>
		<link>http://jwalin.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jwalin.wordpress.com/osd.xml" title="Jwalin Khatri" />
		<item>
		<title>Paging in SQL Server 2005</title>
		<link>http://jwalin.wordpress.com/2008/04/15/paging-in-sql-server-2005/</link>
		<comments>http://jwalin.wordpress.com/2008/04/15/paging-in-sql-server-2005/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 14:31:16 +0000</pubDate>
		<dc:creator>jwalin</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2000]]></category>

		<guid isPermaLink="false">http://jwalin.wordpress.com/?p=16</guid>
		<description><![CDATA[
With Microsoft SQL Server 2005, paging on the database side is simple.  There is a built-in ROW_NUMBER function designed specifically for this task.  However, versions of SQL Server prior to 2005 do not have this capability.  Below is one way to implement similar functionality in pre-2005 versions.  
SELECT TOP X * FROM RECORDS WHERE RecordID [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwalin.wordpress.com&blog=2317521&post=16&subd=jwalin&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="postcontent">
<p><span style="font-family:Arial;">With Microsoft SQL Server 2005, paging on the database side is simple.  There is a built-in <a href="http://msdn2.microsoft.com/en-us/library/ms186734.aspx" target="_blank">ROW_NUMBER</a> function designed specifically for this task.  However, versions of SQL Server prior to 2005 do not have this capability.  Below is one way to implement similar functionality in pre-2005 versions.  </span></p>
<p><span style="font-family:Arial;"><span style="font-size:x-small;color:#0000ff;">SELECT </span><span style="font-size:x-small;color:#0000ff;">TOP</span><span style="font-size:x-small;"> X </span><span style="font-size:x-small;color:#808080;">*</span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#0000ff;">FROM</span><span style="font-size:x-small;"> RECORDS </span><span style="font-size:x-small;color:#0000ff;">WHERE</span><span style="font-size:x-small;"> RecordID </span><span style="font-size:x-small;color:#808080;">NOT</span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#808080;">IN</span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#808080;">(</span><span style="font-size:x-small;color:#0000ff;">SELECT</span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#0000ff;">TOP</span><span style="font-size:x-small;"> Y RecordID </span><span style="font-size:x-small;color:#0000ff;">FROM</span><span style="font-size:x-small;"> RECORDS</span><span style="font-size:x-small;color:#808080;">)</span></span><span style="font-family:Arial;">You must replace X and Y with actual integer values, Unfortuantly, due to sql sytanx, you can’t use varaibles.  The records returned from the above query will followY + 1 = Beginning record<br />
X + Y + 1 = Ending Record</p>
<p><span style="font-family:Arial;">So 10 and 20 plugged in to X and Y respectively would return records 21 thorugh 31.</p>
<p></span></span></p>
<p> </p>
</div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwalin.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwalin.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwalin.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwalin.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwalin.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwalin.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwalin.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwalin.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwalin.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwalin.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwalin.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwalin.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwalin.wordpress.com&blog=2317521&post=16&subd=jwalin&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwalin.wordpress.com/2008/04/15/paging-in-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4be699abbb541e9c09cfcfce329f194?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jwalin</media:title>
		</media:content>
	</item>
	</channel>
</rss>