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 -> Re: How to spool in a cursor loop

Re: How to spool in a cursor loop

From: Tony <andrewst_at_onetel.net.uk>
Date: 11 Jan 2004 04:24:57 -0800
Message-ID: <c0e3f26e.0401110424.51704d4c@posting.google.com>


egkua_at_tm.net.my (egkua) wrote in message news:<b2803687.0401102110.71321adb_at_posting.google.com>...
> I would like to create a file using a spool while in a cursor loop.
> Loop
> if false
> spool off
> true;
> file1 = '..';
> end if
> if true
> spool file1
> end if
> DBMS_OUTPUT.PUT_LINE(...);
> End Loop
>
> It this possible and how?

No, it is not possible. SPOOL is a SQL Plus command, it is not a PL/SQL keyword. You may want to consider using the UTL_FILE package. Received on Sun Jan 11 2004 - 06:24:57 CST

Original text of this message

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