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: Results of Dynamic SQL to a Flat File

Re: Results of Dynamic SQL to a Flat File

From: Patrick Drouin <patrick.drouin_at_remove_this.nortel.com>
Date: 1998/01/13
Message-ID: <34BB8D9B.673FACAE@remove_this.nortel.com>#1/1

Hi there,

 This might be a simple solution... You might want to store the information into a table and simply use SQL PLUS to spool the information to a flat file...

 Ciao,
 P

StackFault_at_rocketmail.com wrote:
>
> I need suggestions on how to execute a SQL query that is dynamically
> created by a stored procedure so that I can get the output into a text
> file for transmision to a mainframe. I'm using Oracle 7.2 over UNIX on a
> DEC Alpha midrange. (Note: UTL_FILE is not available in 7.2)
>
> Our SQL is quite long (over 32K in some cases) and complex as it's used
> for financial reports. Our existing stored procedure that dynamically
> creates the SQL returns it to my new procedure, but I don't know how to
> then run it so that I can see the results (which I could then spool to a
> file). The DBMS package for dynamic SQL seems to only work with DDL and
> DML, not queries. We've tried using PUT_LINE to spool the SQL out, in
> small pieces, to a file that could then be executed from SQL*Plus, but
> the SQL's full of imbedded blanks in the resulting file.
>
> This would think that this is a fairly commong problem. Any suggestions
> would be geatly appreciated.
>
> Mike
> StackFault_at_rocketmail.com
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Received on Tue Jan 13 1998 - 00:00:00 CST

Original text of this message

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