<?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: Generate series using T-SQL</title>
	<atom:link href="http://www.saqib-ansari.com/2010/02/generate-series-using-t-sql.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.saqib-ansari.com/2010/02/generate-series-using-t-sql.html</link>
	<description>Dream came true</description>
	<lastBuildDate>Mon, 29 Aug 2011 13:45:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Saqib Ansari</title>
		<link>http://www.saqib-ansari.com/2010/02/generate-series-using-t-sql.html/comment-page-1#comment-5108</link>
		<dc:creator>Saqib Ansari</dc:creator>
		<pubDate>Fri, 29 Apr 2011 05:20:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.saqib-ansari.com/?p=142#comment-5108</guid>
		<description>Hi Feroz,

Use Declare @ct Int instead of Declare @ct Numeric in your example.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Feroz,</p>
<p>Use Declare @ct Int instead of Declare @ct Numeric in your example.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Feroz</title>
		<link>http://www.saqib-ansari.com/2010/02/generate-series-using-t-sql.html/comment-page-1#comment-5107</link>
		<dc:creator>Feroz</dc:creator>
		<pubDate>Tue, 26 Apr 2011 11:29:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.saqib-ansari.com/?p=142#comment-5107</guid>
		<description>Dear Saqib

I&#039;m unable to use variable instead of 2001 in the above example
Declare @ct Numeric
set @ct=20
BEGIN
      WITH mycte AS
     (
          SELECT @ct id
           UNION ALL
           SELECT id + 1
            FROM    mycte
            WHERE  id + 1 &lt; = 100
     )
      SELECT id
      FROM mycte
      OPTION (MAXRECURSION 0)
 End

it gives error in Sql server 2005 like this

Types don&#039;t match between the anchor and the recursive part in column &quot;id&quot; of recursive query &quot;mycte&quot;.
Plz help me</description>
		<content:encoded><![CDATA[<p>Dear Saqib</p>
<p>I&#8217;m unable to use variable instead of 2001 in the above example<br />
Declare @ct Numeric<br />
set @ct=20<br />
BEGIN<br />
      WITH mycte AS<br />
     (<br />
          SELECT @ct id<br />
           UNION ALL<br />
           SELECT id + 1<br />
            FROM    mycte<br />
            WHERE  id + 1 &lt; = 100<br />
     )<br />
      SELECT id<br />
      FROM mycte<br />
      OPTION (MAXRECURSION 0)<br />
 End</p>
<p>it gives error in Sql server 2005 like this</p>
<p>Types don&#039;t match between the anchor and the recursive part in column &quot;id&quot; of recursive query &quot;mycte&quot;.<br />
Plz help me</p>
]]></content:encoded>
	</item>
</channel>
</rss>

