Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle select statements
In article <7vku1b$je6$1_at_nnrp1.deja.com>,
delonte_at_my-deja.com wrote:
> I have been trying to create a text data-file by spooling the results
of
> a select statement to file. The problem is, Oracle puts a space
between
> the returned columns of a select statement. I know about
concatenating
> columns using '||', but that gets rid of all spaces between the
selected
> fields, not just the one being inserted by oracle.
>
> Is there a way to get rid of the space between columns, which are
being,
> added to separate data elements while maintaining the spaces within
the
> field when oracle returns SQL results?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
With function rpad and lpad you can add any spaces that you want,
and with function ltrim and rtrim - remove spaces .
After that use || for building result string.
use "set HEADING OFF" for remove title of columns
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Nov 02 1999 - 02:20:06 CST