Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Q: Column Format ?

Re: Q: Column Format ?

From: Fred Miller <fred_miller_at_MERCK.COM>
Date: Thu, 11 Jan 1996 12:16:13 EST
Message-Id: <9601111800.AA07712@alice.jcc.com>


Prasad,

Have you tried lpad? Try lpad for numeric columns and rpad for char columns. I tried this in SQL*Plus and it worked.

-Fred Miller
 Sr. DBA
 Merck & Co., Inc
 millerf_at_merck.com

>
>Date: Wed, 10 Jan 1996 13:14:50 MST
>From: Prasad Bammidi <pbammidi_at_CS.UTEP.EDU>
>Subject: Q: Column Format ?
>
>Hi!
>
>We are using Ora-Perl scripts to display data from our Oracle database.
>We are having problems with longer 'column aliases' in queries where the
>alias name exceeds the column size. SQL*Plus truncates the extra characters.
>I can't use the 'column XXX heading YYYYY' setting and 'cloumn format aXX'
>also does not work. My query looks like this:
>
>select
>nvl( PROJECT.SW_APPR, 'NO ANSWER') "Development Approach",
>count (distinct PROJECT.PROJ_NO) "# of projects"
>from
>PROJECT
>group by
>PROJECT.SW_APPR;
>
>The display shows:
>
>Development Appr # of projects
>---------------- -------------
>WATERFALL 55
>EVOLUTIONARY 54
>
>If I do 'column SW_APPR format a30':
>
>It works If I do not use nvl in my query. But I have to use nvl in my queries.
>I can't set the Heading because of some other constraints in my scripts. We
are
>using Oracle 7.0.16 on SUN OS 4.1.3.
>
>Any ideas or work arounds are appreciated. Thanks in adavnce.
>
>Regards,
>Prasad
>(pbammidi_at_cs.utep.edu)
>
>------------------------------
>
Received on Thu Jan 11 1996 - 13:01:35 CST

Original text of this message

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