Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remove blanks from SQLPlus spoot output

1,501 views
Skip to first unread message

nickl...@gmail.com

unread,
May 22, 2009, 4:06:31 PM5/22/09
to
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

ddf

unread,
May 22, 2009, 4:44:12 PM5/22/09
to

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


David Fitzjarrell

ddf

unread,
May 22, 2009, 4:58:08 PM5/22/09
to

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

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:95212348059


David Fitzjarrell

Mark D Powell

unread,
May 23, 2009, 10:24:46 AM5/23/09
to
> http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9...
>
> David Fitzjarrell- Hide quoted text -
>
> - Show quoted text -

I got an error when I tied the link so here is a link to a different
article on how to generate delimited out queries in SQLPlus:

How do I export a database table to a flat file ?

http://www.jlcomp.demon.co.uk/faq/flatfile.html


HTH -- Mark D Powell --

0 new messages