RE: Can somebody help me with "round (columna,columnb) "?

2002-03-03 Thread Roger Baklund
* Michael Widenius > The type of round(x,y) is double(max_double_digits,y) if y is a > constant and double(max_double_digits,4) if y isn't a constant. (The > 4 is just a chosen value, as we didn't think of any better value) mysql> create table testme (number decimal (8,6),digits tinyint(3)); Que

Re: Can somebody help me with "round (columna,columnb) "?

2002-03-02 Thread Michael Widenius
Hi! > "Benjamin" == Benjamin Pflugmann <[EMAIL PROTECTED]> writes: Benjamin> Hi. Benjamin> IMHO your query should work. This looks like a bug to me. I can Benjamin> confirm this on 3.23.46, but have no more current version available Benjamin> for testing. >> I'm having a simple but annoy

RE: Can somebody help me with "round (columna,columnb) "?

2002-03-01 Thread Roger Baklund
* Doug Thompson > On Thu, 28 Feb 2002 22:38:04 -, DL Neil wrote: > > >I know it's getting late, so perhaps I'm not following you sufficiently > >closely. What does "inherited" mean? > > > > "Inherited" referred to using the float(10,4) formatting of the > "numbers" field in this case. It seem

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Sommai Fongnamthip
Round function was discuss on this group. They tell me that it used round with the C behavior to adjust value near even value. If you need to adjust with upper value after .5, you need to used programming language (PHP, VB, C) instead of MySQL round function. Sommai At 18:44 28/2/20

Re: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Doug Thompson
Hi Don: On Thu, 28 Feb 2002 22:38:04 -, DL Neil wrote: >I know it's getting late, so perhaps I'm not following you sufficiently >closely. What does "inherited" mean? > "Inherited" referred to using the float(10,4) formatting of the "numbers" field in this case. > Also how do you define "w

Re: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread DL Neil
Hi Doug, > I spent the last couple of hours replacing the mainboard in another box I have here and doing some testing. It now has the > same board/cpu as this Win98SE machine. It is running Linux-Mandrake 8.0 with MySQL 3.23.38 which came with the LM distro. > > I then created a table and popul

Re: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Doug Thompson
On Thu, 28 Feb 2002 16:53:59 -, DL Neil wrote: >BTW: this apparent accreditation (below) is incorrect/an accident of editing? I >didn't say this. It was Doug (he >says pointing an accusative finger). Doug whilst I'm (appearing to) round on you, >contrary to your comment about >lack of evide

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Roger Baklund
* Doug Thompson > When you repeated the query, the number of significant places was > reduced by one each time. > Thus: > 100.4235 > 100.4230 > 100.4200 > 100.4000 ah. No, this was a misunderstanding... this is what I did: mysql> set @a:=8; Query OK, 0 rows affected (0.00 sec) mysql> select @a

Re: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread DL Neil
Richard, Oops, I seem to have stirred up a hornet's nest! (must be a talent of mine). Sorry about the "riga.riga" thing, I couldn't remember your name... BTW: this apparent accreditation (below) is incorrect/an accident of editing? I didn't say this. It was Doug (he says pointing an accusative

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Doug Thompson
On Thu, 28 Feb 2002 15:49:10 +0100, Roger Baklund wrote: >> 1. If anyone else can produce the declining decimal resolution >> that Roger encountered, then there may be something to >> be found in the mysql code or the gcc libraries. Until then, it >> is a vagary of Roger's installation. I resi

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Doug Thompson
On Thu, 28 Feb 2002 15:32:24 +0100, Roger Baklund wrote: >As far as I can tell, there are at least two bugs. > >One bug is already known, it is the rounding error that applies to some >platforms, depending on the underlaying C library being used: > >win2k, 3.23.30-gamma: > >mysql> select round(1.

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Gary . Every
I've tried the select round(1.5) on: Linux RH7 w/3.23.47 Answer: 2 Solaris 7 w/3.23.38 Answer: 2 Linux Debian w/3.23.38 Answer: 2 sql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) h

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Roger Baklund
* Doug Thompson > On Thu, 28 Feb 2002 12:42:04 -, DL Neil wrote: > > >After a number of rounds of this conversation/developing a > work-around, have we decided that there is a > >fault/bug? > >I don't recall any 'official' involvement to date. > >Has 'riga.riga' submitted a Bug Report to MySQL

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Roger Baklund
* DL Neil > After a number of rounds of this conversation/developing a > work-around, have we decided that there is a fault/bug? As far as I can tell, there are at least two bugs. One bug is already known, it is the rounding error that applies to some platforms, depending on the underlaying C li

Re: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread Doug Thompson
On Thu, 28 Feb 2002 12:42:04 -, DL Neil wrote: >After a number of rounds of this conversation/developing a work-around, have we >decided that there is a >fault/bug? >I don't recall any 'official' involvement to date. >Has 'riga.riga' submitted a Bug Report to MySQL? 1. If anyone else can p

Re: Can somebody help me with "round (columna,columnb) "?

2002-02-28 Thread DL Neil
> >It's not a pretty sight, but it seems to do the work. True, it's a work of art! > OK. No more caffeine for you! 8-)) Enjoyed the joke (whilst sipping my morning tea) After a number of rounds of this conversation/developing a work-around, have we decided that there is a fault/bug? I don't

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-27 Thread Doug Thompson
On Wed, 27 Feb 2002 22:10:44 +0100, Roger Baklund wrote: >One obvious workaround is to avoid floating point numbers... or in mysql >terms, use the decimal/numeric data type instead of float/double... but that >does not solve the problem in this case, I guess floating point is used >internally in

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-27 Thread Roger Baklund
* Doug Thompson > On Wed, 27 Feb 2002 13:53:15 +0100, Roger Baklund wrote: > > >* Doug Thompson > > >> I found using variables to work as expected with 3.23.43 and > >> Win98. > >> > >> I was unable to duplicate your changing outputs. > > > >I was using a 3.23.30-gamma win2k. > > > >> mysql> selec

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-27 Thread Doug Thompson
On Wed, 27 Feb 2002 13:53:15 +0100, Roger Baklund wrote: >* Doug Thompson >> I found using variables to work as expected with 3.23.43 and Win98. >> >> I was unable to duplicate your changing outputs. > >I was using a 3.23.30-gamma win2k. > >> mysql> select @a:=digits,number,round(number,@a) fro

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-27 Thread Roger Baklund
* Doug Thompson > Roger: > I found using variables to work as expected with 3.23.43 and Win98. > > I was unable to duplicate your changing outputs. I was using a 3.23.30-gamma win2k. > mysql> select @a:=digits,number,round(number,@a) from testme; > ++--+--+ >

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-26 Thread Doug Thompson
Roger: I found using variables to work as expected with 3.23.43 and Win98. I was unable to duplicate your changing outputs. mysql> select @a:=digits,number,round(number,@a) from testme; ++--+--+ | @a:=digits | number | round(number,@a) | ++--

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-26 Thread riga . riga
Hi Dan, Your suggestion works but it slows down things a lot. Thats just a workaround, my quick tests showed it takes about 30% longer for the query to complete... It seems to be a bug in mysql, but the problem is that my whole thing is running fine on a bigger production system and I'd not lik

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-26 Thread Daniel Rosher
nesday, 27 February 2002 6:32 a.m. > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: Can somebody help me with "round (columna,columnb) "? > > > Hi Richard, > > > i want to round() the value of a column, but the number of digits is > > depending on th

RE: Can somebody help me with "round (columna,columnb) "?

2002-02-26 Thread Roger Baklund
* [EMAIL PROTECTED] > mysql> select round(number,digits) from testme; > +--+ > | round(number,digits) | > +--+ > | 100.4240 | > | 85.4000 | > +--+ > 2 rows in set (0.08 sec) This looks like a bug... and using var

Re: Can somebody help me with "round (columna,columnb) "?

2002-02-26 Thread DL Neil
Hi Richard, > i want to round() the value of a column, but the number of digits is > depending on the value of another column. i found out, that this doesn't work: > > create table testme > -> (number double (5,4),digits tinyint(3)); > Query OK, 0 rows affected (0.08 sec) > > mysql> explain

Re: Can somebody help me with "round (columna,columnb) "?

2002-02-26 Thread Benjamin Pflugmann
Hi. IMHO your query should work. This looks like a bug to me. I can confirm this on 3.23.46, but have no more current version available for testing. Bye, Benjamin. PS: Forwarded to [EMAIL PROTECTED] On Tue, Feb 26, 2002 at 05:08:59PM +0100, [EMAIL PROTECTED] wrote: > Hi > > I'm hav