Don Thanks. I will have to change them and try that.
I had been bouncing back and forth between decimal and numeric but wasn't sure which was working better. I still think it might have to do with my sql query. Here's an example as you previously mentioned... SELECT DISTINCT measurement, sum(val), pcfver, hour, release FROM pcf WHERE release = curdate()-1 group by measurement, hour; The ->sql runs fine, but there are hours in which I receive duplicated input data. I have filtered as much as I can, but was really needing help from the database driver to eliminate the rest. Thanks for your help. Regards, Kelly W. Black Linux was very clearly the answer, but what was the question again? -----Original Message----- From: Don Read [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 8:30 PM To: Black, Kelly W [PCS] Cc: Mysql (E-mail) Subject: RE: sum() using group, and duplicates problems... On 25-Mar-2003 Black, Kelly W [PCS] wrote: > > On 25-Mar-2003 Black, Kelly W [PCS] wrote: >>> Hello. >>> >>> Sorry for the long post. This has been a big problem for me, and I >>> hope someone will help... >>> >>> I have a long standing problem with an MySQL query. >>> Or perhaps a couple of sql query problems... >>> >>> Firstly I have been told I cannot use sum() on a value while using >>> group by "parm" because it's not accurate. This is obvious as the >>> result sets are often quite wrong... >>> > >>I'm not sure where you got that. I've never seen it. > > > See attached screen shot. It's common knowledge that when comparing > six or eight there's no problem. But once you move into the millions > there's quite a margin for error. > > mysql> select 3333.33333334455 * 94343473264278464 as test; +-----------------------------------+ | test | +-----------------------------------+ | 314478244215319756800.00000000000 | +-----------------------------------+ 1 row in set (0.00 sec) Since you'll only get 15 significant digits w/ a 64bit float, you're in for considerable margins of error. MySQL is _NOT_ an arbitrary precision calculator. If you need that kind of precision, you should be working with DECIMAL(). Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]