Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: file handling in pl/sql
On 23 Jan 2006 09:52:49 -0800, "Amrutha" <amrutha_at_gmail.com> wrote:
>Hi,
>I would like to run a bunch of queries and redirect the output to a
>file. The queries would be run against an Oracle database. I know I can
>create a simple procedure/package to do this, but not clear how to get
>the output redirected to a file.
>Could someone help?
>thanks,
>Amrutha
Evidently this depends on the tool being used.
Sql*plus supports redirection and you can spool to a file in various
formats.
Documented in the sql*plus reference manual.
If would not see why you would create a procedure/package if a simple
sql script would work as well.
In procedures/packages you can use
dbms_output
or better utl_file (no size limitations).
As these packages are documented, and you don't specify your version I
will not detail how to set this up.
-- Sybrand Bakker, Senior Oracle DBAReceived on Mon Jan 23 2006 - 12:41:52 CST
![]() |
![]() |