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 -> Re: do not cut decimal places

Re: do not cut decimal places

From: Eric Parker <eric.parker.spamless_at_virgin.net>
Date: Wed, 2 Jul 2003 10:37:45 +0100
Message-ID: <KJxMa.946$ju6.8239@newsfep4-glfd.server.ntli.net>

"Marek Lange" <marek.lange_at_web.de> wrote in message news:3F02A2D0.9090902_at_web.de...
> Hi,
>
> following problem (oracle8): I want to insert a value with precision
> (#.##) in a number(10,2) column. It works but the values which end with
> .0 or .00 are always truncated:
>
> 100.00 --> 100
> 1000.0 --> 1000
>
> Is there a way to prevent this and to show the decimal places although
> they are 0?
>
> Thanks,
>
> -marek
>

Marek

This is a problem with the way your application is formatting the data. You haven't supplied any information about what is doing the formatting.

SQL> SELECT to_char(a, '9999.99') from t;

TO_CHAR(


    9.99
   10.00
   10.01

SQL> SELECT a from t;

         A


      9.99
        10
     10.01

SQL> HTH eric Received on Wed Jul 02 2003 - 04:37:45 CDT

Original text of this message

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