Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL: Sending output to a text file possible ?
Atif Ahmad Khan wrote:
> I am writing a procedure that queries a few few tables and then
> uses the if-then-else statements to get some answers and output
> the data in html format. I ran into buffer overflow problems when
> I tried to use the dbms_output.put_line. Does anybody know how to
> handle this problem ?
>
> I would be happier if someone told me to how to do this in SQL:
>
> From table products (manufacturer, product). A sql statement that
> gets me the following output :
>
> --------------------------------
> Sony
>
> 21" Trinitron TV
> Discman
> Clock-Radio
>
> Hitachi
>
> Boom Box
> 31" TV
> Mx 133 laptop
> ---------------------------------
>
> I know how to do this in PL/SQL, but PL/SQL has severe I/O
> limitations.
> The best I have been able to do is :
>
> Sony 21" Trinitron TV
> Discman
> Clock-Radio
> .
> .
>
> by using the following SQL code :
>
> spool output.txt ;
> break on manufacturer ;
>
> select manufacturer, product from products order by manufacturer ;
>
> I would appreciate any hints.
>
> Thanks.
>
> Atif Khan
> aak2_at_ra.msstate.edu
Are you using PL/SQL 2.3? And, if so, have you looked at UTL_FILE I/O package that comes with it?
Steve Phelan. Received on Wed Apr 16 1997 - 00:00:00 CDT