Index | Home | Forums
Oracle PL/SQL Example 4-12 Changing the Increment of the Counter in a FOR..LOOP Statement

Example 4-12 Changing the Increment of the Counter in a FOR..LOOP Statement

DECLARE
   TYPE DateList IS TABLE OF DATE INDEX BY PLS_INTEGER;
   dates DateList;
   k CONSTANT INTEGER := 5;  -- set new increment
BEGIN
   FOR j IN 1..3 LOOP
      dates(j*k) := SYSDATE;  -- multiply loop counter by increment
   END LOOP;
END;
/

This page was generated on/at Feb 23,2008 00:20:12
General comments and questions regarding this document should be sent by email to info@oracleabc.com or post your comments here




Index | Home | Forums
Oracle PL/SQL Example 4-12 Changing the Increment of the Counter in a FOR..LOOP Statement

Example 4-12 Changing the Increment of the Counter in a FOR..LOOP Statement

DECLARE
   TYPE DateList IS TABLE OF DATE INDEX BY PLS_INTEGER;
   dates DateList;
   k CONSTANT INTEGER := 5;  -- set new increment
BEGIN
   FOR j IN 1..3 LOOP
      dates(j*k) := SYSDATE;  -- multiply loop counter by increment
   END LOOP;
END;
/

This page was created by oracleabc.com on Feb 23,2008 00:09:02
General comments and questions regarding this document should be sent by email to info@oracleabc.com or post your comments here