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: format of the output

Re: format of the output

From: Vu Pham <vu_at_sivell.com>
Date: Tue, 24 Feb 2004 19:22:24 -0600
Message-ID: <c1gt97$1huaqg$1@ID-219297.news.uni-berlin.de>

"Mark C. Stock" <mcstockX_at_Xenquery .com> wrote in message news:vdWdnboPlaA9I6bdRVn-gw_at_comcast.com...
>
> "Vu Pham" <vu_at_sivell.com> wrote in message
> news:c1ge5r$1id6bc$1_at_ID-219297.news.uni-berlin.de...
> | Two of the fields in my table are NAME CHAR(30) and SECTION CHAR(1)
> |
> | The following SQL produces the corresponding result;
> | -----------------------------------------------
> | SQL> select name, section from tablea;
> |
> | NAME S
> | ------------------------------ -
> | User 0 S
> | User 1 E
> | User 2 M
> | ------------------------------------------------
> |
> | Is there anyway to control the field width of the output, something that
> can
> | give me a result like ?
> | NAME SECTION
> | -------------- -----------
> | User 0 S
> | User 1 E
> | User 2 M
> |
> |
> | Thanks,
> |
> | Vu
> |
> |
>
>
> you need the SQL*Plus COLUMN command, ie
>
> column name format a14
> column section format a7
>
> note that these commands are in affect for the duration of the SQL*Plus
> session (until you exit the tool) or until they are reset -- they are not
> tied to a specific SQL statement, so they will be applied to the results
of
> any column with the specified name
>
> check out the SQL*Plus guide for a lot more interesting settings
>

Thanks, Marc. Just downloaded the sqlplus pdf. Yes, it's interesting - and overloads me :-)

Vu Received on Tue Feb 24 2004 - 19:22:24 CST

Original text of this message

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