<?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: SQL IF/WHILE Blocks &#8211; SQL For Programmers</title>
	<atom:link href="http://blog.dmbcllc.com/2008/09/30/sql-ifwhile-blocks-sql-for-programmers/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dmbcllc.com/2008/09/30/sql-ifwhile-blocks-sql-for-programmers/</link>
	<description>ASP.NET, HTML, CSS, Visual Studio, CSharp, VB.NET and other programming items of interest.</description>
	<lastBuildDate>Thu, 11 Mar 2010 14:34:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave</title>
		<link>http://blog.dmbcllc.com/2008/09/30/sql-ifwhile-blocks-sql-for-programmers/comment-page-1/#comment-1725</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Mon, 09 Mar 2009 18:20:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dmbcllc.com/2008/09/30/sql-ifwhile-blocks-sql-for-programmers/#comment-1725</guid>
		<description>I fail to see how this wouldn&#039;t cause an infite loop.  But, your problem is that you are trying to subselect in a while, which as the error states, can&#039;t be done.

I have to assume you aren&#039;t showing me the whole picture.  It also isn&#039;t t-sql syntax.  So, using t-sql, you want something like:

declare limit number;
declare nextval number;
begin
  SET @limit = 72011080;
  Select @nextval = SEQTITRES.nextval from dual;
  while @nextVal &lt; @limit
  loop
    Select @nextval = SEQTITRES.nextval from dual;
  end loop;
end;</description>
		<content:encoded><![CDATA[<p>I fail to see how this wouldn&#8217;t cause an infite loop.  But, your problem is that you are trying to subselect in a while, which as the error states, can&#8217;t be done.</p>
<p>I have to assume you aren&#8217;t showing me the whole picture.  It also isn&#8217;t t-sql syntax.  So, using t-sql, you want something like:</p>
<p>declare limit number;<br />
declare nextval number;<br />
begin<br />
  SET @limit = 72011080;<br />
  Select @nextval = SEQTITRES.nextval from dual;<br />
  while @nextVal < @limit<br />
  loop<br />
    Select @nextval = SEQTITRES.nextval from dual;<br />
  end loop;<br />
end;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sene</title>
		<link>http://blog.dmbcllc.com/2008/09/30/sql-ifwhile-blocks-sql-for-programmers/comment-page-1/#comment-1724</link>
		<dc:creator>sene</dc:creator>
		<pubDate>Mon, 09 Mar 2009 15:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dmbcllc.com/2008/09/30/sql-ifwhile-blocks-sql-for-programmers/#comment-1724</guid>
		<description>Hello,

Could you please help me with this sql procedure? I always got an error message when executed, at the line with while. The error message is after the procedure:

declare
    limit number;
begin
    limit := 72011080;
    while (select SEQTITRES.nextval from dual) &lt; limit
    loop
    select SEQTITRES.nextval from dual;
    end loop;
end;


ERROR MESSAGE:
PLS-00103: Encountered the symbol &quot;SELECT&quot; when expecting one of the following:

   ( - + case mod new not null others 
   &lt;a&gt; &lt;/a&gt;&lt;a&gt; avg
   count current exists max min prior sql stddev sum variance
   execute forall merge time timestamp interval date
   &lt;/a&gt;&lt;a&gt;
   &lt;/a&gt;&lt;a&gt; &lt;/a&gt;&lt;a&gt; pipe
   &lt;an alternatively-quoted string literal with character set sp

Thanks in advance,&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Could you please help me with this sql procedure? I always got an error message when executed, at the line with while. The error message is after the procedure:</p>
<p>declare<br />
    limit number;<br />
begin<br />
    limit := 72011080;<br />
    while (select SEQTITRES.nextval from dual) &lt; limit<br />
    loop<br />
    select SEQTITRES.nextval from dual;<br />
    end loop;<br />
end;</p>
<p>ERROR MESSAGE:<br />
PLS-00103: Encountered the symbol &#8220;SELECT&#8221; when expecting one of the following:</p>
<p>   ( &#8211; + case mod new not null others<br />
   <a> </a><a> avg<br />
   count current exists max min prior sql stddev sum variance<br />
   execute forall merge time timestamp interval date<br />
   </a><a><br />
   </a><a> </a><a> pipe<br />
   &lt;an alternatively-quoted string literal with character set sp</p>
<p>Thanks in advance,</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop &#8211; September 30, 2008 (Evening Edition) &#124; Alvin Ashcraft's Morning Dew</title>
		<link>http://blog.dmbcllc.com/2008/09/30/sql-ifwhile-blocks-sql-for-programmers/comment-page-1/#comment-905</link>
		<dc:creator>Dew Drop &#8211; September 30, 2008 (Evening Edition) &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Wed, 01 Oct 2008 02:30:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dmbcllc.com/2008/09/30/sql-ifwhile-blocks-sql-for-programmers/#comment-905</guid>
		<description>[...] SQL IF/WHILE Blocks - SQL For Programmers (Dave M. Bush) [...]</description>
		<content:encoded><![CDATA[<p>[...] SQL IF/WHILE Blocks &#8211; SQL For Programmers (Dave M. Bush) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.205 seconds -->
