Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do001-brf@adv.magwien.gv.atI Insert newlines between columns
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)
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
![]() |
![]() |