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

Home -> Community -> Usenet -> c.d.o.misc -> LOOP question

LOOP question

From: Iancrozier <iancrozier_at_aol.com>
Date: 15 Sep 1999 20:10:14 GMT
Message-ID: <19990915161014.02295.00000716@ng-fm1.aol.com>


I have code something like:
DECLARE v_column number;

CURSOR a IS SELECT column FROM table;

BEGIN OPEN a;

LOOP FETCH a INTO v_column;

mesg := (RPAD(vcolumn,12));

UTL_FILE.PUTF(file_name,'%s\n',mesg);

UTL_FILE.PUT_LINE(file_name,' . ');

UTL_FILE.FFLUSH(file_name);

EXIT WHEN A%NOTFOUND; END LOOP; END;

When I look into file_name, the last row is always in there TWICE!

What am I doing wrong? TIA

Ian Crozier Received on Wed Sep 15 1999 - 15:10:14 CDT

Original text of this message

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