|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
I have a SQL script that contains a cursor in it. I'm having trouble with spooling the output of the cursor. Does anyone know of a way to do this?
|
|
#2
|
|||
|
|||
|
I have too little information about what you're trying to do to give decent answer but here is one way using DBMS_OUTPUT:
Code:
set serverout on size 1000000
set pages 55
spool t.lis
DECLARE
CURSOR whatever is
SELECT a_column_name fld
FROM mytable;
BEGIN
DBMS_OUTPUT.enable(1000000);
FOR X in whatever
LOOP
DBMS_OUTPUT.put_line('fld=' || x.fld);
END LOOP;
END;
/
spool off
|
|
#3
|
|||
|
|||
|
Thanks Jim,
It worked out for me. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > How to Spool the Output of a Cursor to a Flat File? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|