Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: do not cut decimal places
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.comReceived on Wed Jul 02 2003 - 05:03:36 CDT