Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Stored procedure : spool to output file

515837Jun 28 2006 — edited Jun 29 2006
i have to spool data from a stored proc to a csv file.I am using dbms_output.put command as i have mulitiple things to put in a row , comma delimited
My proc looks like this
------------------------------------------------------------------------------
create or replace proc xyz
declare
cursor c is select x y z .....
form
d f f f
where ....
variable declaration
begin
someting something ..
for rec in cursor
loop
dbms_output.put(x1||',');
dbms_output.put(x2||',');
dbms_output.put(x3||',');
.
.
.
dbms_output.put(x4||',');
dbms_output.NEW_LINE;
endloop
-----------------------------------------------------
This does not seem to be working ,Can you please tell me the correct way to do so .
I need a comma delimited file at the end .
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2006
Added on Jun 28 2006
9 comments
15,997 views