Re: Can print to file in PL/SQL?
Date: 1995/09/14
Message-ID: <846767967wnr_at_chaff.demon.co.uk>#1/1
In article: <DEv7rI.2L9_at_da_vinci.ecte.uswc.uswest.com> jarchie_at_ivar7 (Jennifer
L. Archie) writes:
> Christopher L. Beck (clbeck_at_us.oracle.com) wrote:
>
> : declare
> : file_ptr text_io.file_type;
> : begin
> : file_ptr := text_io.fopen( 'FILE_NAME', 'W' );
> : text_io.put_line( file_ptr, 'ONE LINE OF THE FILE' );
> : text_io.put_line( file_ptr, 'ANOTHER LINE OF THE FILE' );
> : text_io.fclose( file_ptr );
> : end;
>
> Thanks Chris,
>
> That's exactly what I would like to do. But ...
>
> It appears that we do not have the TEXT_IO package in our db; by the way,
For TEXT_IO, read DBMS_OUTPUT !
You will also need to put
SET SERVEROUTPUT ON SIZE n
at the top of your script, where 'n' is the expected size of output in bytes (we usually just put 1000000 which is the max as far as I'm aware).
Regards,
Pete
-- ------------------------------------------------------------------------ | Peter Moore - Database Administrator - MAT Transport Ltd, London, UK | pt_at_chaff.demon.co.uk : +44 (171) 410 6373 | "With a little study you'll go a long ways & I wish you'd start now!"Received on Thu Sep 14 1995 - 00:00:00 CEST