Re: Baffled by error

2006-05-16 Thread Mike Blezien
Gordon, thank you, works prefectly now. Mike - Original Message - From: "Gordon" <[EMAIL PROTECTED]> To: "'Mike Blezien'" <[EMAIL PROTECTED]>; "'MySQL List'" Sent: Tuesday, May 16, 2006 3:17 PM Subject: RE: Baffled by

RE: Baffled by error

2006-05-16 Thread Gordon
SUM(c.agent_product_time) >= '500' ORDER BY mins You have to do the SUM with the GROUP BY before you can test the criteria -Original Message- From: Mike Blezien [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 10:30 AM To: MySQL List Subject: Baffled by error Hello, MySQL 4

Re: Baffled by error

2006-05-16 Thread Mike Blezien
Peter, - Original Message - From: "Peter Brawley" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]> Cc: "MySQL List" Sent: Tuesday, May 16, 2006 1:25 PM Subject: Re: Baffled by error Mike, >How would this query be constructed w

Re: Baffled by error

2006-05-16 Thread Peter Brawley
;MySQL List" Sent: Tuesday, May 16, 2006 1:07 PM Subject: Re: Baffled by error Mike Blezien wrote: Hello, MySQL 4.1.12 trying to figure out why I keep getting this error with the following query: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time) AS mins FROM account a LEFT

Re: Baffled by error

2006-05-16 Thread Mike Blezien
Peter, - Original Message - From: "Peter Brawley" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]> Cc: "MySQL List" Sent: Tuesday, May 16, 2006 1:07 PM Subject: Re: Baffled by error Mike Blezien wrote: Hello, MySQL 4.1.12 tr

Re: Baffled by error

2006-05-16 Thread Rhino
- Original Message - From: "Rhino" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]>; "MySQL List" Sent: Tuesday, May 16, 2006 1:56 PM Subject: Re: Baffled by error - Original Message - From: "Mike Blezien"

Re: Baffled by error

2006-05-16 Thread Peter Brawley
Mike Blezien wrote: Hello, MySQL 4.1.12 trying to figure out why I keep getting this error with the following query: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time) AS mins FROM account a LEFT JOIN calls c ON c.account_id = a.id WHERE c.calldate >= DATE_SUB(NOW(),INTERVAL 14

Re: Baffled by error

2006-05-16 Thread Mike Blezien
corrected it and still the same error. Mike - Original Message - From: "Chris Sansom" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]>; "MySQL List" Sent: Tuesday, May 16, 2006 12:56 PM Subject: Re: Baffled by error At 12:29 -05

Re: Baffled by error

2006-05-16 Thread Mike Blezien
MAIL PROTECTED]>; "'MySQL List'" Sent: Tuesday, May 16, 2006 12:58 PM Subject: RE: Baffled by error Is because in your select you have c.accound_id and in your group by clause you have a.accound_id Try this: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time)

RE: Baffled by error

2006-05-16 Thread Ing. Edwin Cruz
AND c.agent_id = 9 AND SUM(c.agent_product_time) >= '500' GROUP BY c.account_id ORDER BY mins Regards! -Mensaje original- De: Mike Blezien [mailto:[EMAIL PROTECTED] Enviado el: Martes, 16 de Mayo de 2006 12:30 p.m. Para: MySQL List Asunto: Baffled by error Hello, MySQL 4

Re: Baffled by error

2006-05-16 Thread Chris Sansom
At 12:29 -0500 16/5/06, Mike Blezien wrote: trying to figure out why I keep getting this error with the following query: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time) AS mins FROM account a LEFT JOIN calls c ON c.account_id = a.id WHERE c.calldate >= DATE_SUB(NOW(),INTERVAL 14

Re: Baffled by error

2006-05-16 Thread Rhino
- Original Message - From: "Mike Blezien" <[EMAIL PROTECTED]> To: "MySQL List" Sent: Tuesday, May 16, 2006 1:29 PM Subject: Baffled by error Hello, MySQL 4.1.12 trying to figure out why I keep getting this error with the following query: SELECT c.a

Baffled by error

2006-05-16 Thread Mike Blezien
Hello, MySQL 4.1.12 trying to figure out why I keep getting this error with the following query: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time) AS mins FROM account a LEFT JOIN calls c ON c.account_id = a.id WHERE c.calldate >= DATE_SUB(NOW(),INTERVAL 14 DAY) AND c.agent_id =