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: Mark C. Stock <mcstockX_at_Xenquery>
Date: Wed, 25 Feb 2004 06:41:02 -0500
Message-ID: <ueSdnU4dQqdTFKHdRVn-tw@comcast.com>

"Jim Kennedy" <kennedy-downwithspammersfamily_at_attbi.net> wrote in message news:vqT_b.9183$AL.183272_at_attbi_s03...
|
| "Vu Pham" <vu_at_sivell.com> wrote in message
| news:c1gt97$1huaqg$1_at_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
| >
| >
| The other problem is you are using char instead of varchar2 and are
getting
| blank padded character strings.
| You probably do not want to do that.
| Jim
|
|

good eyes, jim

;-{ mcs Received on Wed Feb 25 2004 - 05:41:02 CST

Original text of this message

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