Re: SQL*Plus Column Formatting

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/08/15
Message-ID: <33F42116.2533_at_iol.ie>#1/1


James Bourne wrote:
>
> All,
>
> How do I wrap a series of fields in a column definition.
> For example:
>
> COLUMN Address FORMAT A30 WORD_WRAPPED
> SELECT table.field1 || '\n' || table.field2 Address
> FROM table
> WHERE id = 1000;
>
> How do I force the wrap (where the \n is)?
>
> any help would be greatly appreciated.
>
> Many thanks,
>
> ---------------------------------------------
> James Bourne
> TAPS Development
> Telstra Multimedia Pty. Ltd.
> Phone: 02 9903 3435
> EMail: jbourne_at_nibupls1.telstra.comdotau
> (pls. replace dot with . to email me)

column field1 format ...
column field2 format ... new_line

select field1, field2 from ...

Note that concatenation is not necessary. (I know that this answer is limited and will allow you to wrap only one field of this type per select statement. It will work in the case you give, though)

HTH

-- 
Chrysalis

FABRICATI DIEM, PVNC
('To Protect and to Serve')
Terry Pratchett : "Guards Guards"
Received on Fri Aug 15 1997 - 00:00:00 CEST

Original text of this message