UPDATE does round value automatically - is it an error?
am 07.10.2005 14:07:12 von Georg
------_=_NextPart_001_01C5CB37.A0C20A9D
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
Hello!
=20
I use Mysql Server: 4.1.14-max on Windows Standard Server 2003
=20
The Table is MyIsam and there is a Database field with Datatype float
called "kasse_s"
The value of this field is 10323.2
I want to UPDATE this field to 10323.22
After the update which goes without errors the field value is still
10323.2 and not as I would expect 10323.22
=20
What mistake I am making?
How do I solve my problem?
=20
Thank you for your help!
=20
Sincerely
Georg
=20
=20
------_=_NextPart_001_01C5CB37.A0C20A9D--
Re: UPDATE does round value automatically - is it an error?
am 07.10.2005 15:50:24 von Felix Geerinckx
On 07/10/2005, "Vassilopulos, Georg" wrote:
> The Table is MyIsam and there is a Database field with Datatype float
> called "kasse_s"
>
> The value of this field is 10323.2
>
> I want to UPDATE this field to 10323.22
>
> After the update which goes without errors the field value is still
> 10323.2 and not as I would expect 10323.22
10323.22 is beyond the precision of the FLOAT datatype. Use DOUBLE
instead.
--
felix
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: UPDATE does round value automatically - is it an error?
am 07.10.2005 16:26:56 von vegelin
Hi All,
What about this ?
CREATE TABLE Test ( F FLOAT ) Type = MyISAM;
INSERT INTO Test VALUES ( 10323.22 );
INSERT INTO Test VALUES ( 10323.2222 );
SELECT * FROM Test;
10323.2
10323.2
SELECT Round(F,3) FROM Test;
10323.220
10323.223
SELECT Round(F,4) FROM Test;
10323.2197
10323.2227
Regards, Cor
Subject: Re: UPDATE does round value automatically - is it an error?
> On 07/10/2005, "Vassilopulos, Georg" wrote:
>
>> The Table is MyIsam and there is a Database field with Datatype float
>> called "kasse_s"
>>
>> The value of this field is 10323.2
>>
>> I want to UPDATE this field to 10323.22
>>
>> After the update which goes without errors the field value is still
>> 10323.2 and not as I would expect 10323.22
>
> 10323.22 is beyond the precision of the FLOAT datatype. Use DOUBLE
> instead.
>
>
> --
> felix
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=vegelin@freeler.nl
>
>
>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org