Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL problem
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