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: formatting output with SQL*Plus

Re: formatting output with SQL*Plus

From: Thomas Kellerer <NNGNVRDSJEBN_at_spammotel.com>
Date: Wed, 08 Dec 2004 19:19:40 +0100
Message-ID: <31outtF3e05ssU1@individual.net>


On 08.12.2004 19:15 Colum Mylod wrote:

>>I'm hitting the old problem that I need to spool data into a text file, but
>>SQL*Plus insists on padding the fields to the length of the column definition.

>
> There is a way which I've used to make the dbms_metadata.get_ddl
> package spool out a decent usable (as DDL SQL) piece of code, this
> might help you. Look for the put_line PL./SQL procedure which has a
> "compress" 2nd argument to squeeze out the irritating space-to-EOL
> chars.
>
> I got this from http://adp-gmbh.ch/ora/misc/oru_10028.html
>
> It's all clean readable code. You can modify this package, then select
> your stuff into a varchar2, then put_line(that varchar2, boolean)
> where boolean is TRUE for that "compression", which you can readily
> fix to your taste. Does require some PL/SQLing but that's Just Another
> Language really :-)

Hi Colum,

thanks for your reply. This sounds like a good idea, but unfortunately we are not allowed to create new procedures in the database.

Cheers
Thomas Received on Wed Dec 08 2004 - 12:19:40 CST

Original text of this message

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