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: PL/SQL problem

Re: PL/SQL problem

From: csj <csj_at_logimens.com>
Date: 1997/05/14
Message-ID: <337A402A.CB8FD7FB@logimens.com>#1/1

Silvercup wrote:

> Hi there,
>
> I have what I think is a simple problem, but where I am new to
> Oracle,
> I'll ask anyway.
>
> How can I call a 'normal' SQL statement save in an ASCII text
> file
> from PL/SQL, with parameters?
>
> For example, I have:
>
> DECLARE
> filename CHAR(XX);
>
> BEGIN
>
> Do something here to create a spool filename;
>
> call a SQL statement which does a select, and spools result to
>
> filename;
>
> END;
>
> Can anyone help?
>
> Thanks in advance,
> --
> David J. Pierce | "Life is what happens to you,
> Programmer Consultant | while your busy making other
> plans."
> Computing And Communications | - John Winston Lennon
> Memorial University Of Newfoundland |

 You can use the UTL_FILE package that comme with Oracle 7.3.2. This package allows you to read from files and write to files from a PL/SQL procedure.

--
C.S.J.
Received on Wed May 14 1997 - 00:00:00 CDT

Original text of this message

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