<?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 for Growing up is optional</title>
	<atom:link href="http://josephlindsay.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://josephlindsay.com</link>
	<description>Joseph Lindsay - Specialist generalist, Web Craftsman</description>
	<pubDate>Thu, 08 Jan 2009 12:26:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Thoughts on the New Zealand Skate Market by Nasty New Zealand Longboard Skateboard Market : Longboard, Long board, Longboard Reviews, Longboard Skateboard - Skurfboards.com</title>
		<link>http://josephlindsay.com/archives/2006/01/06/thoughts-on-the-new-zealand-skate-market/comment-page-1/#comment-46846</link>
		<dc:creator>Nasty New Zealand Longboard Skateboard Market : Longboard, Long board, Longboard Reviews, Longboard Skateboard - Skurfboards.com</dc:creator>
		<pubDate>Wed, 09 Jan 2008 07:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/archives/2006/01/06/thoughts-on-the-new-zealand-skate-market/#comment-46846</guid>
		<description>[...] Lindsay a local longboarder and previous skurfboards contest winner wrote a great article about the New Zealand skateboard market .This is a topic that is on the minds of most kiwi longboarders. New Zealand has most likely got [...]</description>
		<content:encoded><![CDATA[<p>[...] Lindsay a local longboarder and previous skurfboards contest winner wrote a great article about the New Zealand skateboard market .This is a topic that is on the minds of most kiwi longboarders. New Zealand has most likely got [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Paging results in MS SQL Server by frosty_yul</title>
		<link>http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/comment-page-1/#comment-30496</link>
		<dc:creator>frosty_yul</dc:creator>
		<pubDate>Thu, 31 May 2007 14:28:07 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/?p=240#comment-30496</guid>
		<description>wish you could edit previous posts..

anyway, forget the word "dynamic", just need to sort by a field in the inner table.  any ideas?</description>
		<content:encoded><![CDATA[<p>wish you could edit previous posts..</p>
<p>anyway, forget the word &#8220;dynamic&#8221;, just need to sort by a field in the inner table.  any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Paging results in MS SQL Server by frosty_yul</title>
		<link>http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/comment-page-1/#comment-29980</link>
		<dc:creator>frosty_yul</dc:creator>
		<pubDate>Fri, 25 May 2007 20:24:16 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/?p=240#comment-29980</guid>
		<description>this paging script is great, until you would like to dynamically sort by a field in the inner table.

does anyone have a script that can handle this?</description>
		<content:encoded><![CDATA[<p>this paging script is great, until you would like to dynamically sort by a field in the inner table.</p>
<p>does anyone have a script that can handle this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Paging results in MS SQL Server by broicher</title>
		<link>http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/comment-page-1/#comment-28665</link>
		<dc:creator>broicher</dc:creator>
		<pubDate>Tue, 08 May 2007 09:50:39 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/?p=240#comment-28665</guid>
		<description>this editor s.... you can reach me here if you have questions  www.digital-ecom.de  cu folks</description>
		<content:encoded><![CDATA[<p>this editor s&#8230;. you can reach me here if you have questions  <a href="http://www.digital-ecom.de" rel="nofollow">http://www.digital-ecom.de</a>  cu folks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Paging results in MS SQL Server by broicher</title>
		<link>http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/comment-page-1/#comment-28664</link>
		<dc:creator>broicher</dc:creator>
		<pubDate>Tue, 08 May 2007 09:48:28 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/?p=240#comment-28664</guid>
		<description>ok, second part:
WHERE Row&#62;=1 AND Row=100 AND Row</description>
		<content:encoded><![CDATA[<p>ok, second part:<br />
WHERE Row&gt;=1 AND Row=100 AND Row</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Paging results in MS SQL Server by broicher</title>
		<link>http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/comment-page-1/#comment-28594</link>
		<dc:creator>broicher</dc:creator>
		<pubDate>Mon, 07 May 2007 18:45:30 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/?p=240#comment-28594</guid>
		<description>Hi folks,
if you use SQL 205 there is a much easier and faster solution. If you have more than 100.000 records, this here is a few seconds faster than the other solutions. In fact its pretty the same what mySQL does in the background, but its faster.

SELECT *
FROM (SELECT ROW_NUMBER()
         OVER (ORDER BY Your_Data_ID DESC)
         AS Row, * 
      FROM Your_Data)
      AS WithRowNumbers
WHERE  Row &#62;= 1 AND Row </description>
		<content:encoded><![CDATA[<p>Hi folks,<br />
if you use SQL 205 there is a much easier and faster solution. If you have more than 100.000 records, this here is a few seconds faster than the other solutions. In fact its pretty the same what mySQL does in the background, but its faster.</p>
<p>SELECT *<br />
FROM (SELECT ROW_NUMBER()<br />
         OVER (ORDER BY Your_Data_ID DESC)<br />
         AS Row, *<br />
      FROM Your_Data)<br />
      AS WithRowNumbers<br />
WHERE  Row &gt;= 1 AND Row</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Paging results in MS SQL Server by tubesteako</title>
		<link>http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/comment-page-1/#comment-26529</link>
		<dc:creator>tubesteako</dc:creator>
		<pubDate>Mon, 16 Apr 2007 16:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/?p=240#comment-26529</guid>
		<description>Again, html encoded...


$x = number of rows per page
$y = x * page number

$count = $dbh-&#62;query("SELECT count(*) FROM table WHERE conditions");

if ($count &#60; $y){
   $x = $count % $x
}

Then plug $x, $y into the original formula:

SELECT * FROM (
    SELECT TOP x * FROM (
        SELECT TOP y fields
        FROM table
        WHERE conditions
        ORDER BY table.field  ASC) as foo
    ORDER by field DESC) as bar
ORDER by field ASC</description>
		<content:encoded><![CDATA[<p>Again, html encoded&#8230;</p>
<p>$x = number of rows per page<br />
$y = x * page number</p>
<p>$count = $dbh-&gt;query(&#8221;SELECT count(*) FROM table WHERE conditions&#8221;);</p>
<p>if ($count &lt; $y){<br />
   $x = $count % $x<br />
}</p>
<p>Then plug $x, $y into the original formula:</p>
<p>SELECT * FROM (<br />
    SELECT TOP x * FROM (<br />
        SELECT TOP y fields<br />
        FROM table<br />
        WHERE conditions<br />
        ORDER BY table.field  ASC) as foo<br />
    ORDER by field DESC) as bar<br />
ORDER by field ASC</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Paging results in MS SQL Server by tubesteako</title>
		<link>http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/comment-page-1/#comment-26341</link>
		<dc:creator>tubesteako</dc:creator>
		<pubDate>Fri, 13 Apr 2007 22:10:01 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/?p=240#comment-26341</guid>
		<description>Let me start by saying that Microsoft SQL Server 2000 is Satan's gift to the world.

I've been using my programming language (php) to solve Foxhop's problem (#10), without the use of stored procs or temp tables:

$x = number of rows per page
$y = x * page number

$count = "SELECT count(*) FROM table WHERE conditions";

if ($count </description>
		<content:encoded><![CDATA[<p>Let me start by saying that Microsoft SQL Server 2000 is Satan&#8217;s gift to the world.</p>
<p>I&#8217;ve been using my programming language (php) to solve Foxhop&#8217;s problem (#10), without the use of stored procs or temp tables:</p>
<p>$x = number of rows per page<br />
$y = x * page number</p>
<p>$count = &#8220;SELECT count(*) FROM table WHERE conditions&#8221;;</p>
<p>if ($count</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Paging results in MS SQL Server by tuco</title>
		<link>http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/comment-page-1/#comment-14343</link>
		<dc:creator>tuco</dc:creator>
		<pubDate>Sun, 28 Jan 2007 22:37:35 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/?p=240#comment-14343</guid>
		<description>Oh, oh, it seems the system doesn't allow me to paste all the code. Nevermind, a did a few improvement, reducing the "overhead" for the first select. If you want to take a look, I put a copy of this script at http://www.asteria.com.br/paging.txt

Cheers!</description>
		<content:encoded><![CDATA[<p>Oh, oh, it seems the system doesn&#8217;t allow me to paste all the code. Nevermind, a did a few improvement, reducing the &#8220;overhead&#8221; for the first select. If you want to take a look, I put a copy of this script at <a href="http://www.asteria.com.br/paging.txt" rel="nofollow">http://www.asteria.com.br/paging.txt</a></p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Paging results in MS SQL Server by tuco</title>
		<link>http://josephlindsay.com/archives/2005/05/27/paging-results-in-ms-sql-server/comment-page-1/#comment-14342</link>
		<dc:creator>tuco</dc:creator>
		<pubDate>Sun, 28 Jan 2007 22:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://josephlindsay.com/?p=240#comment-14342</guid>
		<description>Hi there!

This is the procedure I came over after the many samples. You simple have to pass a filter (this was in my case) plus the page number. Hope it helps! :)

ALTER PROCEDURE SP_CENARIO_LIST 1, 0

	@ID_CENARIO tinyint,
	@page int = 0,
	@numrows int = 10

AS

DECLARE @offset int

SET @offset = (@page * @numrows)

-- Whole select
SELECT
	IDENTITY(int, 1,1) AS RowNum,
	CAST(CD_PERSONAGEM AS int) AS CD_PERSONAGEM,
	DE_ARQUIVO,
	DT_CADASTRO
INTO
	#temp
FROM
	T001_PERSONAGEM
WHERE
	FL_OPCAO = @ID_CENARIO
AND
	FL_ATIVO = 1
AND
	FL_PUBLICAVEL = 1
ORDER BY
	DT_CADASTRO ASC

-- Paging
SELECT
	*
FROM
	#temp
WHERE
	RowNum &#62; @offset
AND
	RowNum </description>
		<content:encoded><![CDATA[<p>Hi there!</p>
<p>This is the procedure I came over after the many samples. You simple have to pass a filter (this was in my case) plus the page number. Hope it helps! <img src='http://josephlindsay.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ALTER PROCEDURE SP_CENARIO_LIST 1, 0</p>
<p>	@ID_CENARIO tinyint,<br />
	@page int = 0,<br />
	@numrows int = 10</p>
<p>AS</p>
<p>DECLARE @offset int</p>
<p>SET @offset = (@page * @numrows)</p>
<p>&#8211; Whole select<br />
SELECT<br />
	IDENTITY(int, 1,1) AS RowNum,<br />
	CAST(CD_PERSONAGEM AS int) AS CD_PERSONAGEM,<br />
	DE_ARQUIVO,<br />
	DT_CADASTRO<br />
INTO<br />
	#temp<br />
FROM<br />
	T001_PERSONAGEM<br />
WHERE<br />
	FL_OPCAO = @ID_CENARIO<br />
AND<br />
	FL_ATIVO = 1<br />
AND<br />
	FL_PUBLICAVEL = 1<br />
ORDER BY<br />
	DT_CADASTRO ASC</p>
<p>&#8211; Paging<br />
SELECT<br />
	*<br />
FROM<br />
	#temp<br />
WHERE<br />
	RowNum &gt; @offset<br />
AND<br />
	RowNum</p>
]]></content:encoded>
	</item>
</channel>
</rss>
