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

Home -> Community -> Usenet -> c.d.o.server -> How to format NUMBER(8,4) to '0000.0000' output??

How to format NUMBER(8,4) to '0000.0000' output??

From: salenavr <navrsalemile_at_yahoo.ca>
Date: 6 Sep 2006 15:41:17 -0700
Message-ID: <1157582477.895226.154930@b28g2000cwb.googlegroups.com>


This is the query

select

    lpad( nvl(to_char(COLA, '0000.0000'),' '), 9, 0 ) as cola     from TABLE_A
    where AN_ID = 15;

COLA



 0000.458

i.e. output is ' 0000.458' with the blank at the first position

and I want output to be '0000.4580'

i.e. the number should be padded with zeros.

COLA is defined in the table as :

COL_A NUMBER(8,4) Received on Wed Sep 06 2006 - 17:41:17 CDT

Original text of this message

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