<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: while statement in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/while-statement/qaa-p/13835305#M4866148</link>
    <description>&lt;P&gt;The correct syntax for WHILE is  &lt;/P&gt;
&lt;P&gt;WHILE...LOOP
END LOOP;&lt;/P&gt;
&lt;P&gt;The loop name is optional. See LOOP in the documentation for a complete discussion.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jun 2023 08:20:26 GMT</pubDate>
    <dc:creator>chris_keating</dc:creator>
    <dc:date>2023-06-22T08:20:26Z</dc:date>
    <item>
      <title>while statement</title>
      <link>https://community.sap.com/t5/technology-q-a/while-statement/qaq-p/13835302</link>
      <description>&lt;P&gt;Can somebody tell me which mistake am I doing, why I get syntax error with this block?
&lt;/P&gt;&lt;PRE&gt;create or replace procedure myproc()
begin
declare myvar int;
set myvar = 1;
while myvar &amp;lt;10 begin
set myvar= myvar+1;
end;
end;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 08:08:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/while-statement/qaq-p/13835302</guid>
      <dc:creator>Baron</dc:creator>
      <dc:date>2023-06-22T08:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: while statement</title>
      <link>https://community.sap.com/t5/technology-q-a/while-statement/qaa-p/13835304#M4866147</link>
      <description>&lt;P&gt;as alternative this has worked:&lt;/P&gt;
&lt;PRE&gt;create or replace procedure myproc()
begin
declare myvar int;
set myvar = 1;
myloop:
while myvar &amp;lt;10 loop
set myvar= myvar+1;
end loop myloop;
end;
&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jun 2023 08:13:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/while-statement/qaa-p/13835304#M4866147</guid>
      <dc:creator>Baron</dc:creator>
      <dc:date>2023-06-22T08:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: while statement</title>
      <link>https://community.sap.com/t5/technology-q-a/while-statement/qaa-p/13835305#M4866148</link>
      <description>&lt;P&gt;The correct syntax for WHILE is  &lt;/P&gt;
&lt;P&gt;WHILE...LOOP
END LOOP;&lt;/P&gt;
&lt;P&gt;The loop name is optional. See LOOP in the documentation for a complete discussion.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 08:20:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/while-statement/qaa-p/13835305#M4866148</guid>
      <dc:creator>chris_keating</dc:creator>
      <dc:date>2023-06-22T08:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: while statement</title>
      <link>https://community.sap.com/t5/technology-q-a/while-statement/qaa-p/13835303#M4866146</link>
      <description>&lt;P&gt;You are mixing your Watcom SQL and Transact-SQL into the same procedure.  The brackets after the procedure name and the BEGIN..END after the procedure definition is Watcom-SQL, but you're trying to use the &lt;A href="https://help.sap.com/docs/SAP_SQL_Anywhere/93079d4ba8e44920ae63ffb4def91f5b/81805c1c6ce21014baeba41d742808cc.html?q=while"&gt;Transact-SQL version of the WHILE statement&lt;/A&gt; (i.e. no LOOP..END LOOP).&lt;/P&gt;
&lt;P&gt;You alternative SQL for the procedure is all Watcom-SQL.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 08:40:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/while-statement/qaa-p/13835303#M4866146</guid>
      <dc:creator>regdomaratzki</dc:creator>
      <dc:date>2023-06-22T08:40:46Z</dc:date>
    </item>
  </channel>
</rss>

