<?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: Building ranges using a dynamically generated numbers table</title>
	<atom:link href="http://codegumbo.com/index.php/2009/01/25/building-ranges-using-a-dynamically-generated-numbers-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://codegumbo.com/index.php/2009/01/25/building-ranges-using-a-dynamically-generated-numbers-table/</link>
	<description>Laissez Les Bon Code Roulez!</description>
	<lastBuildDate>Fri, 04 Nov 2011 11:51:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: stuart</title>
		<link>http://codegumbo.com/index.php/2009/01/25/building-ranges-using-a-dynamically-generated-numbers-table/comment-page-1/#comment-612</link>
		<dc:creator>stuart</dc:creator>
		<pubDate>Thu, 04 Nov 2010 13:26:06 +0000</pubDate>
		<guid isPermaLink="false">http://codegumbo.com/?p=223#comment-612</guid>
		<description>Hey Jeff,

Sorry for the late reply; been a busy couple of weeks.  I never disavowed the method; I jsut never went back and changed the code.   After looking at it for a couple of minutes this morning, I figured out how to alter my proc, but honestly, it&#039;s not a priority.  I&#039;ll keep it in mind forthe future, though.

Stu</description>
		<content:encoded><![CDATA[<p>Hey Jeff,</p>
<p>Sorry for the late reply; been a busy couple of weeks.  I never disavowed the method; I jsut never went back and changed the code.   After looking at it for a couple of minutes this morning, I figured out how to alter my proc, but honestly, it&#8217;s not a priority.  I&#8217;ll keep it in mind forthe future, though.</p>
<p>Stu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Moden</title>
		<link>http://codegumbo.com/index.php/2009/01/25/building-ranges-using-a-dynamically-generated-numbers-table/comment-page-1/#comment-602</link>
		<dc:creator>Jeff Moden</dc:creator>
		<pubDate>Sun, 24 Oct 2010 15:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://codegumbo.com/?p=223#comment-602</guid>
		<description>Heh... after more than a year, I&#039;m just curious... have you embraced the idea of using a numbers table or are you still using recurrsion for such a thing?</description>
		<content:encoded><![CDATA[<p>Heh&#8230; after more than a year, I&#8217;m just curious&#8230; have you embraced the idea of using a numbers table or are you still using recurrsion for such a thing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stuart</title>
		<link>http://codegumbo.com/index.php/2009/01/25/building-ranges-using-a-dynamically-generated-numbers-table/comment-page-1/#comment-157</link>
		<dc:creator>stuart</dc:creator>
		<pubDate>Fri, 25 Sep 2009 19:36:37 +0000</pubDate>
		<guid isPermaLink="false">http://codegumbo.com/?p=223#comment-157</guid>
		<description>Hey Jeff,

I&#039;ve used Numbers table before, but I couldn&#039;t figure out a way to use them to generate a table of ranges; see the latter half of my post.

I tried modifying your method, but it&#039;s 3:30 on a Friday, and I&#039;m brain dead :)

Stu</description>
		<content:encoded><![CDATA[<p>Hey Jeff,</p>
<p>I&#8217;ve used Numbers table before, but I couldn&#8217;t figure out a way to use them to generate a table of ranges; see the latter half of my post.</p>
<p>I tried modifying your method, but it&#8217;s 3:30 on a Friday, and I&#8217;m brain dead <img src='http://codegumbo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Stu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Moden</title>
		<link>http://codegumbo.com/index.php/2009/01/25/building-ranges-using-a-dynamically-generated-numbers-table/comment-page-1/#comment-138</link>
		<dc:creator>Jeff Moden</dc:creator>
		<pubDate>Tue, 22 Sep 2009 00:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://codegumbo.com/?p=223#comment-138</guid>
		<description>Hi Stuart,

After running the following comparison code, you may want to reconsider the idea of using recursion...

SET STATISTICS IO ON
PRINT REPLICATE(&#039;=&#039;,80)
PRINT &#039;========== Stefan Keir Gordon&#039;&#039;s method ==========&#039;
SET STATISTICS TIME ON
;WITH Numbers(n) AS
   (SELECT 1 AS n
	UNION ALL
	SELECT (n + 1) AS n
	FROM Numbers
	WHERE n &lt;= 32767)
SELECT n
FROM Numbers
WHERE n&lt;=32767
OPTION(MAXRECURSION 32767)
SET STATISTICS TIME OFF

PRINT REPLICATE(&#039;=&#039;,80)
PRINT &#039;========== Jeff Moden&#039;&#039;s method ==========&#039;
SET STATISTICS TIME ON

 SELECT TOP 32767
        ROW_NUMBER() OVER (ORDER BY (ac1.Object_ID)) AS N
   FROM Master.sys.All_Columns ac1
  CROSS JOIN Master.sys.All_Columns ac2

SET STATISTICS TIME OFF
SET STATISTICS IO OFF
PRINT REPLICATE(&#039;=&#039;,80)

You may also want to start delving into the idea of having a permanent Tally or Numbers table.  Please see the following article.

http://www.sqlservercentral.com/articles/T-SQL/62867/</description>
		<content:encoded><![CDATA[<p>Hi Stuart,</p>
<p>After running the following comparison code, you may want to reconsider the idea of using recursion&#8230;</p>
<p>SET STATISTICS IO ON<br />
PRINT REPLICATE(&#8216;=&#8217;,80)<br />
PRINT &#8216;========== Stefan Keir Gordon&#8221;s method ==========&#8217;<br />
SET STATISTICS TIME ON<br />
;WITH Numbers(n) AS<br />
   (SELECT 1 AS n<br />
	UNION ALL<br />
	SELECT (n + 1) AS n<br />
	FROM Numbers<br />
	WHERE n &lt;= 32767)<br />
SELECT n<br />
FROM Numbers<br />
WHERE n&lt;=32767<br />
OPTION(MAXRECURSION 32767)<br />
SET STATISTICS TIME OFF</p>
<p>PRINT REPLICATE(&#039;=&#039;,80)<br />
PRINT &#039;========== Jeff Moden&#039;&#039;s method ==========&#039;<br />
SET STATISTICS TIME ON</p>
<p> SELECT TOP 32767<br />
        ROW_NUMBER() OVER (ORDER BY (ac1.Object_ID)) AS N<br />
   FROM Master.sys.All_Columns ac1<br />
  CROSS JOIN Master.sys.All_Columns ac2</p>
<p>SET STATISTICS TIME OFF<br />
SET STATISTICS IO OFF<br />
PRINT REPLICATE(&#039;=&#039;,80)</p>
<p>You may also want to start delving into the idea of having a permanent Tally or Numbers table.  Please see the following article.</p>
<p><a href="http://www.sqlservercentral.com/articles/T-SQL/62867/" rel="nofollow">http://www.sqlservercentral.com/articles/T-SQL/62867/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

