Re: Problem with SUM and DECIMAL field

2005-02-24 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 LAFONTAINE Julien - LYO wrote: > Hi Mark, > > Thank you for your help. > > I have the same problem when I execute the query with the MySQL client on my > AIX server : > > mysql> select sum(AMFTPF) from DWH_AMF; > > +-+ > | sum(AMFTPF) |

RE: Problem with SUM and DECIMAL field

2005-02-24 Thread LAFONTAINE Julien - LYO
, but maybe I'm doing something wrong. Regards, Julien -Message d'origine- De : Mark Matthews [mailto:[EMAIL PROTECTED] Envoyé : lundi 21 février 2005 16:24 À : LAFONTAINE Julien - LYO Cc : mysql@lists.mysql.com Objet : Re: Problem with SUM and DECIMAL field -BEGIN PGP

Re: Problem with SUM and DECIMAL field

2005-02-21 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 LAFONTAINE Julien - LYO wrote: > Hi everyone, > > I've recentely upgarded my servers from MySQL 3.23.49 to MySQL 4.1.9. > > Now I have a problem when using the SUM operator on DECIMAL field. > > The value returned by the SUM operator when used with

Re: Problem with SUM and DECIMAL field

2005-02-21 Thread Gleb Paharenko
Hell. I think you should read comments at: http://bugs.mysql.com/bug.php?id=1388 They are related to the ODBC connector, but may be it will help you to solve problems with Connector/J. LAFONTAINE Julien - LYO <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I've recentely upgar

Problem with SUM and DECIMAL field

2005-02-17 Thread LAFONTAINE Julien - LYO
Hi everyone, I've recentely upgarded my servers from MySQL 3.23.49 to MySQL 4.1.9. Now I have a problem when using the SUM operator on DECIMAL field. The value returned by the SUM operator when used with DECIMAL field has a coma (,) as decimal separator while it used to be have a dot (.) . If I

RE: Problem with sum()

2003-04-03 Thread LeTortorec, Jean-Louis
Thanks, I'll do that. -Original Message- From: gerald_clark [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 4:52 PM To: LeTortorec, Jean-Louis Cc: '[EMAIL PROTECTED]' Subject: Re: Problem with sum() Because neither 0.7 nor 0.1 have an exact binary

RE: Problem with sum()

2003-04-03 Thread Jennifer Goodie
L PROTECTED] > Sent: Thursday, April 03, 2003 1:40 PM > To: '[EMAIL PROTECTED]' > Subject: Problem with sum() > > > Hello every one, > > I have a simple table, with a "float" field called quantity. > In this table, there are 2 records: 1 with quantity=0

Re: Problem with sum()

2003-04-03 Thread gerald_clark
Because neither 0.7 nor 0.1 have an exact binary floating point reprsentation. Use Decimal type instead. LeTortorec, Jean-Louis wrote: Hello every one, I have a simple table, with a "float" field called quantity. In this table, there are 2 records: 1 with quantity=0.7, and 1 with quantity=0.1.

Problem with sum()

2003-04-03 Thread LeTortorec, Jean-Louis
Hello every one, I have a simple table, with a "float" field called quantity. In this table, there are 2 records: 1 with quantity=0.7, and 1 with quantity=0.1. When I do a "select sum(quantity) from mytable", I got 0.798956919 instead of 0.8. Does any body know why? Thanks. Jean-Louis

Re: a problem with sum()

2003-01-01 Thread Adolfo Bello
By looking at your query and table description, I guess you can try something like: SELECT cus.`Code` AS `Customer Code`, cus.`Name` AS `Customer`,SUM((1-bil.direction)*bil.Total) AS Loan, SUM(bil.direction*bil.Total) AS Credit FROM customer AS cus, bill AS bil WHERE bil.`Customer` = cus.`ID` GRO

a problem with sum()

2003-01-01 Thread Aziz Durmaz
Hi, I have got 2 tables one of the is "customers" the other is "bill". In the customers table i store my customers informations. In the bill table i store my billings. if i take a bill bill.direction=0, if i give a bill bill.direction=1. And now i must take a report Like This.. Customer Code