FW: aggregate functions producing bad data

2002-09-17 Thread Richard Unger
MySQL <-- to defeat the spam filter -Original Message- From: Richard Unger Sent: Tuesday, September 17, 2002 1:46 PM To: 'Dan Nelson' Cc: [EMAIL PROTECTED] Subject: RE: aggregate functions producing bad data Thanks, I figured it out. It turns out there were some ca

RE: aggregate functions producing bad data

2002-09-17 Thread Richard Unger
mysql> Select count(id) from t_calllog_calls where id IS NULL; +---+ | count(id) | +---+ | 0 | +---+ 1 row in set (0.00 sec) > -Original Message- > From: mtoth [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 12:39 PM > To: Ric

RE: aggregate functions producing bad data

2002-09-17 Thread Richard Unger
> -Original Message- > From: Dan Nelson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 12:31 PM > To: Brian Reichert > Cc: Richard Unger; [EMAIL PROTECTED] > Subject: Re: aggregate functions producing bad data > > > In the last episode (S

RE: aggregate functions producing bad data

2002-09-17 Thread Richard Unger
id is the primary key. There are no entries in the DB where id=NULL Cheers, Rich > -Original Message- > From: Brian Reichert [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 12:16 PM > To: Richard Unger > Cc: [EMAIL PROTECTED] > Subject: Re: aggregate f

RE: aggregate functions producing bad data

2002-09-17 Thread Richard Unger
ent: Tuesday, September 17, 2002 12:08 PM > To: Richard Unger; [EMAIL PROTECTED] > Subject: Re: aggregate functions producing bad data > > > Hi, > I think you should try to use 0 instead of NULL > > Regards, > > Gelu > _

RE: aggregate functions producing bad data

2002-09-17 Thread Richard Unger
+---+ | count(id) | +---+ |35 | +---+ -Original Message- From: Richard Unger Sent: Tuesday, September 17, 2002 12:00 PM To: '[EMAIL PROTECTED]' Subject: aggregate functions producing bad data My query: SELECT count(id), count( IF(

aggregate functions producing bad data

2002-09-17 Thread Richard Unger
My query: SELECT count(id), count( IF(call_end - call_start > 5, id, NULL) ), count( IF(call_end - call_start <= 5, id, NULL) ) FROM t_calllog_calls; My result: 1994 1956 35 However, 1956 + 35 != 1994. Running MySQL 3.23.49-nt Cheers, Rich ---

RE: MIN/MAX( IF( ...) ) problems: min bigger than max

2002-08-20 Thread Richard Unger
Is it fixed only in MySQL 4.x, or will it be in the next point release of 3.x as well? Cheers, Rich > -Original Message- >Thanks for bug report! > >If NULL is present (t_calllog_calls.call_end - >t_calllog_calls.call_start < 5) the result_type is changed from >int to char. > >It was fi