Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do i make a text log file in Oracle?
"Maggie Evans" <maggie-evans_at_home.com> wrote in message news:<k10h7.51388$7h.10146153_at_news2.rdc1.bc.home.com>...
> Is there a way to create a text file
> pump in a bunch of strings and then close it ?
>
>
> thanks in advance for any help
> owen
Your question isn't very specific. Are you wanting to do this from SQL*Plus, Pro*c, a Form ....?
For sqlplus see the spool command:
spool filename
run some sql
spool off
From pl/sql use the utl_file package to read and write text files (to and from db server only) or if the file will be small and you run the pl/sql from sqlplus you can use a combination of the dbms_output package and spool.
From Pro*c just use printf or utl_file
From Forms I think there is a routine called text_io to perform this kind of task, but I believe it is limited to reading and writing on the client machine.
I hope gives you some things to look into.
![]() |
![]() |