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: andrewst <member14183_at_dbforums.com>
Date: Wed, 02 Jul 2003 10:03:36 +0000
Message-ID: <3065835.1057140216@dbforums.com>

Originally posted by Marek Lange
> 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

You do not have a problem, you have a misunderstanding. You are confusing the storage of numbers with the display format. If you want to see 2 decimal places, format the output. e.g. in SQL:

select TO_CHAR(value,'99990.00') from tab;

--
Posted via http://dbforums.com
Received on Wed Jul 02 2003 - 05:03:36 CDT

Original text of this message

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