Michael Stassen wrote:
>
> You would increase your chances of getting a useful answer if you would
> take
> the time to reformat your query to be easily readable, as I have done for
> you below.
>
> > SELECT Product.Product,
> >AssignedToAgent.AgentName AS AssignedTo,
> >sum(Inqu
Geoffrey R. Thompson wrote:
I have an interesting problem that I cannot find any clues to in the MySQL
documentation. The following query works in 3.2.3, but does not work in
4.1.7:
You would increase your chances of getting a useful answer if you would take
the time to reformat your query to be
ECTED]
> Date: Tue, Nov-23-2004 10:25 AM
> Subject: Re: Alias query problem in 4.1.7?
>
> Try changing your GROUP BY to use the column name of the second column
> in
> the SELECT, not the alias of the second column name, i.e.
>
> GROUP BY `Product`.`Product`, `AssignedToAgent`.`A
com
> -Original Message-
> From: Rhino [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 23, 2004 10:26 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Alias query problem in 4.1.7?
>
> Try changing your GROUP BY to use the column name
Try changing your GROUP BY to use the column name of the second column in
the SELECT, not the alias of the second column name, i.e.
GROUP BY `Product`.`Product`, `AssignedToAgent`.`AgentName`
That should work on any version of MySQL. I don't think you're allowed to
use aliases in a GROUP BY, only