Ask a Question related to Oracle Server, Design and Development.
-
Marek Lange #1
do not cut decimal places
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 Lange Guest
-
Rounding decimal places
What is the best and most acurate way to round a number to 2 decimal places. It has the be a correctly rounded number not just a mask.. eg: round... -
Rounding to 2 decimal places
I have this placed in my code <%Response.write(Session("MembershipCost"))%> the number it contains is 605 how do i use the round Function to... -
To 2 decimal places
Folks, I know some of you here are extremely dynamic. I am working with a variable that is declared as a decimal. But I want to convert the... -
How to ensure 2 places to right of decimal
How can I make certain that decimal values print out 2 places to the right all the time when displaying them on a website coming from an Access... -
Decimal places!
Hi fellow Director users!, I had a countdown timer (75 seconds) for a game, and I wanted to display the time taken to complete it, in a field. ... -
Eric Parker #2
Re: do not cut decimal places
"Marek Lange" <marek.lange@web.de> wrote in message
news:3F02A2D0.9090902@web.de...Marek> 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
>
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
Eric Parker Guest
-
andrewst #3
Re: do not cut decimal places
Originally posted by Marek LangeYou do not have a problem, you have a misunderstanding. You are> 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
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 [url]http://dbforums.com[/url]
andrewst Guest



Reply With Quote

