Stored procedure : spool to output file
515837Jun 28 2006 — edited Jun 29 2006i 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 .