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: How do001-brf@adv.magwien.gv.atI Insert newlines between columns

Re: How do001-brf@adv.magwien.gv.atI Insert newlines between columns

From: Josef Pranke <001-brf_at_adv.magwien.gv.at>
Date: Fri, 28 May 1999 11:49:07 +0200
Message-ID: <927884516.716257@mozart.adv.magwien.gv.at>


I solved a similar problem in the following way:

set trimspool on
set linesize 80

select rpad(column_a,80),
       rpad(column_b,80),
       rpad(colum_c,80)

from table_name;

oracle will insert the linefeeds for you (created on unix but should work on every platform, depends on your linesize, etc.)

regards

Keith Jamieson schrieb:
>
> I have an SQL statement as follows:
> select column_a,
> column_b
> column_c
> from table_name etc.
>
> I would like to format the output so that it appears as follows:
>
> columna
> columnb
> columnc
>
> So, I need to concatenate the newline command. (\n) at the end of the
> first two columns.
> The problem is that if I just coincatenate the newline command, the
> output I get is
> just columna\n columnb\n columnc\n.
> Does anyone know how I can achieve this?
>
>
Received on Fri May 28 1999 - 04:49:07 CDT

Original text of this message

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