Home » SQL & PL/SQL » SQL & PL/SQL » spool into file
spool into file [message #246851] Fri, 22 June 2007 04:33 Go to next message
ninja17
Messages: 12
Registered: June 2007
Junior Member
Hi, I have a procedure like this, and I need to extract (spool) output to a text file.

CREATE PROCEDURE test IS
cursor c1 is select Name from Table1;
BEGIN
FOR i IN c1 LOOP
-- start spool
dbms_output.put line ('customers name is' || i.name );
-- end spool
END LOOP;

There are 1000 rows in the table and I need to create a new text file after each 100 rows and write following records into it.

Could you help me with that pls ? thanks
Re: spool into file [message #246858 is a reply to message #246851] Fri, 22 June 2007 04:45 Go to previous message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use UTL_FILE package.

Regards
Michel
Previous Topic: case statment doubt
Next Topic: Printing the column as rows in a table with the help of group by
Goto Forum:
  


Current Time: Wed Dec 07 10:43:48 CST 2016

Total time taken to generate the page: 0.20463 seconds