Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to spool in a cursor loop
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
![]() |
![]() |