<?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>topic Loop using a variable. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/loop-using-a-variable/m-p/4729074#M608307</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;Is there a way to loop through a variable and with the value in that variable I have to insert into the table.&lt;BR /&gt;&lt;BR /&gt;eg.,&lt;BR /&gt;&lt;BR /&gt;colors = {'BLUE','BLACK','ORANGE','YELLOW'};&lt;BR /&gt;&lt;BR /&gt;loop&lt;BR /&gt;&lt;BR /&gt; for each value (:value)in color&lt;BR /&gt; insert into the table&lt;BR /&gt;  (col1,&lt;BR /&gt;  col2,&lt;BR /&gt;  color&lt;BR /&gt;  )&lt;BR /&gt;  values&lt;BR /&gt;  (val1,&lt;BR /&gt;  val2,&lt;BR /&gt;  :value&lt;BR /&gt;                );&lt;BR /&gt;&lt;BR /&gt;end loop;</description>
    <pubDate>Tue, 21 Dec 2010 12:01:18 GMT</pubDate>
    <dc:creator>karthik_25</dc:creator>
    <dc:date>2010-12-21T12:01:18Z</dc:date>
    <item>
      <title>Loop using a variable.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/loop-using-a-variable/m-p/4729074#M608307</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Is there a way to loop through a variable and with the value in that variable I have to insert into the table.&lt;BR /&gt;&lt;BR /&gt;eg.,&lt;BR /&gt;&lt;BR /&gt;colors = {'BLUE','BLACK','ORANGE','YELLOW'};&lt;BR /&gt;&lt;BR /&gt;loop&lt;BR /&gt;&lt;BR /&gt; for each value (:value)in color&lt;BR /&gt; insert into the table&lt;BR /&gt;  (col1,&lt;BR /&gt;  col2,&lt;BR /&gt;  color&lt;BR /&gt;  )&lt;BR /&gt;  values&lt;BR /&gt;  (val1,&lt;BR /&gt;  val2,&lt;BR /&gt;  :value&lt;BR /&gt;                );&lt;BR /&gt;&lt;BR /&gt;end loop;</description>
      <pubDate>Tue, 21 Dec 2010 12:01:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/loop-using-a-variable/m-p/4729074#M608307</guid>
      <dc:creator>karthik_25</dc:creator>
      <dc:date>2010-12-21T12:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Loop using a variable.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/loop-using-a-variable/m-p/4729075#M608308</link>
      <description>&lt;BR /&gt;please check the below example&lt;BR /&gt;=======================================&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;SQL&amp;gt; -- display data in the table&lt;BR /&gt;SQL&amp;gt; select * from Employee&lt;BR /&gt;  2  /&lt;BR /&gt;&lt;BR /&gt;no rows selected&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;SQL&amp;gt; BEGIN&lt;BR /&gt;  2    FOR v_LoopCounter IN 1..10 LOOP&lt;BR /&gt;  3      INSERT INTO employee (id)&lt;BR /&gt;  4        VALUES (v_LoopCounter);&lt;BR /&gt;  5    END LOOP;&lt;BR /&gt;  6  END;&lt;BR /&gt;  7  /&lt;BR /&gt;&lt;BR /&gt;PL/SQL procedure successfully completed.&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;SQL&amp;gt; select * from employee;&lt;BR /&gt;&lt;BR /&gt;ID   FIRST_NAME           LAST_NAME            START_DAT END_DATE      SALARY CITY       DESCRIPTION&lt;BR /&gt;---- -------------------- -------------------- --------- --------- ---------- ---------- ---------------&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;5&lt;BR /&gt;6&lt;BR /&gt;7&lt;BR /&gt;8&lt;BR /&gt;9&lt;BR /&gt;10&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;10 rows selected.&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Dec 2010 12:20:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/loop-using-a-variable/m-p/4729075#M608308</guid>
      <dc:creator>kemo</dc:creator>
      <dc:date>2010-12-21T12:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Loop using a variable.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/loop-using-a-variable/m-p/4729076#M608309</link>
      <description>Hi Kemo, Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;If its a integer counter, i can increment and pass the value to the insert statement.&lt;BR /&gt;&lt;BR /&gt;How to do this if its a set of string variable?&lt;BR /&gt;&lt;BR /&gt;for str_counter in ('STR1', 'STR2','STR3') --  is this type of implementation possible??</description>
      <pubDate>Tue, 21 Dec 2010 12:30:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/loop-using-a-variable/m-p/4729076#M608309</guid>
      <dc:creator>karthik_25</dc:creator>
      <dc:date>2010-12-21T12:30:05Z</dc:date>
    </item>
  </channel>
</rss>

