Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> pl/sql table and commit

pl/sql table and commit

From: Guy <guhar1_at_yahoo.com>
Date: 15 Nov 2005 12:56:10 -0800
Message-ID: <1132088170.134345.134970@g43g2000cwa.googlegroups.com>


When I insert into a pl/sql table, do I need to commit ?

I have a package body which defines a pl/sql table to contains a DATE table type;

   TYPE DateTable       IS TABLE OF DATE
        INDEX BY BINARY_INTEGER;

I have procedure P_PROC(), which

The MyProc() is very simple: opens a cursor which performs a SELECT and return rows of one date column:

                      n := 1;
	      LOOP
		 FETCH C1 INTO v_DateTable(n);
		 EXIT WHEN C1%NOTFOUND;
		 n := n + 1;
	      END LOOP;

By accident I found if I do the following, my legacy application works:
              begin
                      n := 1;
	      LOOP
		 FETCH C1 INTO v_DateTable(n);
		 EXIT WHEN C1%NOTFOUND;
		 n := n + 1;
	      END LOOP
                  commit;
               end;

Do we need to commit the v_DateTable to be valid? Is there a visibiliby problem for a v_DateTable declared in a proc and filled in a proc of a package?

Thanks, Received on Tue Nov 15 2005 - 14:56:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US