dbTalk Databases Forums  

Remove blanks from SQLPlus spoot output

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Remove blanks from SQLPlus spoot output in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nickli2000@gmail.com
 
Posts: n/a

Default Remove blanks from SQLPlus spoot output - 05-22-2009 , 03:06 PM






Hi,

Is there a set or format command in SQLPlus that will remove
leading whitespaces from fields? Essentially I want to output comma-
delimited files with no spaces before or after columns.
I know I could probably concatenate the fields using "|" or use
UTL_FILE package and PL/SQL. This is however undesirable as there are
large number of columns and a lot of ad-hoc queries need to be run.

Thanks in advance.

Nick


Reply With Quote
  #2  
Old   
ddf
 
Posts: n/a

Default Re: Remove blanks from SQLPlus spoot output - 05-22-2009 , 03:44 PM






On May 22, 3:06*pm, nickli2... (AT) gmail (DOT) com wrote:
Quote:
Hi,

* * Is there a *set or format command in SQLPlus that will remove
leading whitespaces from fields? Essentially I want to output comma-
delimited files with no spaces before or after columns.
I know I could probably concatenate the fields using "|" or use
UTL_FILE package and PL/SQL. This is however undesirable as there are
large number of columns and a lot of ad-hoc queries need to be run.

* * Thanks in advance.

* * Nick
No. You'll need to use ||','|| between column names to generate the
output you want.


David Fitzjarrell


Reply With Quote
  #3  
Old   
ddf
 
Posts: n/a

Default Re: Remove blanks from SQLPlus spoot output - 05-22-2009 , 03:58 PM



On May 22, 3:44*pm, ddf <orat... (AT) msn (DOT) com> wrote:
Quote:
On May 22, 3:06*pm, nickli2... (AT) gmail (DOT) com wrote:

Hi,

* * Is there a *set or format command in SQLPlus that will remove
leading whitespaces from fields? Essentially I want to output comma-
delimited files with no spaces before or after columns.
I know I could probably concatenate the fields using "|" or use
UTL_FILE package and PL/SQL. This is however undesirable as there are
large number of columns and a lot of ad-hoc queries need to be run.

* * Thanks in advance.

* * Nick

No. *You'll need to use ||','|| between column names to generate the
output you want.

David Fitzjarrell
Why re-invent the wheel when Tom Kyte has a procedure/function/script
to do this same thing?

http://asktom.oracle.com/pls/asktom/...ID:95212348059


David Fitzjarrell


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.