Re: FLOAT
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 02 Nov 2005 20:04:55 +0100
On Wed, 2 Nov 2005 11:19:15 -0500, Rogers wrote:
>I want to use only float datatype but the problem is that it return more
>than two decimal, I want to minimize to two decimal points? I don't want to
>use decimal datatype.... I only wanna use float.....
>
>The result should looks like
>
>152254.45
>
>but now it's giving me.
>
>152254.45123232363
>
>Any solution ?
Hi Rogers,
No, of course not. The FLOAT datatype is designed to *not* have an exact
and limited number of decimals. The datatypes that are designed to offer
a fixed number of decimal places are decimal and numeric.
Saying "I want to have two decimal points but I don't want to use
decimal datatype... I olnly wanna use float" is like saying "I want to
travel by air but I don't want to use a plane... I only wanna use a
boat".
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
.
- Follow-Ups:
- Re: FLOAT
- From: Rogers
- Re: FLOAT
- References:
- FLOAT
- From: Rogers
- FLOAT
- Prev by Date: FLOAT
- Next by Date: Re: FLOAT
- Previous by thread: FLOAT
- Next by thread: Re: FLOAT
- Index(es):
Relevant Pages
|