Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: formatting output with SQL*Plus
Thu, 09 Dec 2004 09:17:55 +0100 Thomas Kellerer
<NNGNVRDSJEBN_at_spammotel.com> wrote:
> On 09.12.2004 08:04 Frank Piron wrote:
>
>> 1)
>> Write a stored proc which spools the text file using
>> the utl_file package. You have full control over the
>> formatting and you have a chance to understand it if
>> you look at it 2 years later.
>>
>> 2)
>> Call the stored proc with SQL*Plus from your batch.
>>
>
> I have never used the utl_file package, but to my knowledge this will
> create the
> file on the server, correct?
This is correct.
> As I have no access to the Oracle server (other then through SQL) how
> would I
> get the file from the Oracle server to the server where the batch file
> is running?
Hmmm, i see, no ftp-ing possible? Alternatively you could write the result
into a Clob with a stored proc. Then, using an anonymous block in SQL*Plus,
you could read out the Clob piecewise and output it via
dbms_output.put_line.
Although this sounds quite complicated it might work.
Regards
-- Frank Piron, defrankatkonaddot (leftrotate two)Received on Fri Dec 10 2004 - 01:34:03 CST