| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL How to output to file - beginner
Me wrote:
> I'm a beginner using PL/SQL and I can't figure out how to print
> output from the database to a file.
You can either use
spool outfile
begin
dbms_output.put_line('Output');
end;
or
declare
filhand utl_file.file_type;
begin
filhand := utl_file.fopen('<out_dir>','outfile','w');
utl_file.put(filhand,'Output');
utl_file.fclose(filhand);
end;
For this method to work the init.ora parameter
utl_file_dir=<out_dir>
needs to be set.
Regards,
Ian Received on Thu Dec 04 1997 - 00:00:00 CST
![]() |
![]() |