Hi gurus,
I need to spool the results of an anonymous PL/SQL block on the client where I execute the Sql Developer, to be able to semi automate a data extraction.
I have no access to the DB server, I can only connect with sql, so I can't (I think) use the UTL_FILE procedures.
The export is a quaite big amount of data, so if I use something like the following code it rise the buffer overflow error:
Spool myfile.csv
begin
SELECT daty, year BULK COLLECT INTO col_date_day, col_date_year FROM my_table
FOR i IN col_date_day.FIRST .. col_date_year.LAST
LOOP
DBMS_OUTPUT.PUT_LINE(col_date_day(i) || ',' || col_date_year(i));
END LOOP;
end;
/
spool off
I need a PL/sql with loops because my logics is a little bit more complex than the examples.
Is there any way to efficently spool on my local machine?
Or there is some way to use the seme funcion of the export Sql developer expose from user interface to do it?
Thanks in advance!
Daniele