Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Writing to a text file from PL/SQL

Re: Writing to a text file from PL/SQL

From: Álvaro Palma Aste <queria_direccion_at_el.perla.invalid>
Date: Mon, 22 Jul 2002 20:33:24 +0000 (UTC)
Message-ID: <ahhq6k$dpm$2@localhost.localdomain>


Andrew Hardy escribió:
>Jasna,

>> I'm trying to retrive data from an Oracle table into a text file by the
>sql
>> procedure wich is atached to this mail but I get following declaration
>> mistakes:
>>
>> Input truncated to 1 characters
>> f TEXT_IO.FILE_TYPE;

>Text_IO is an Oracle Forms package. If you want to do file IO on the
>server/sql*plus have a look at the UTL_FILE package.

>Andy

Or you can do it using dbms_output instructions. You only have to put the lines:

set serveroutput on size 1000000 -- (linit in bytes for the output file)

spool <output_file_name>

declare
....
begin
...

  dbms_output.put_line('Hello, I am an example');

end;

-- 
Atte.
Álvaro Palma Aste
Grupo de Ing. Biomédica
Depto. de Ing. Eléctrica - U. de Chile
******************************************************
It's the only form of protest they're allowed 
I've seen their silent faces scream so loud 
If they were to speak these words they'd go missing too 
Another woman on a torture table what else can they do

Sting - They Dance Alone...
Received on Mon Jul 22 2002 - 15:33:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US