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

Results of Dynamic SQL to a Flat File

From: <StackFault_at_rocketmail.com>
Date: 1998/01/12
Message-ID: <884642437.133496842@dejanews.com>#1/1

  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 Mon Jan 12 1998 - 00:00:00 CST

Original text of this message

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