Thanks for that Nicolas.
Yasir
Can you run without the Order By at all? If not, you may need to
properly join the tables.
I could reproduce the issue with MySQL 4.1 as well and I would go around
it myself by creating a temporaty table, populating it with the
aggregate, doing a select on the te
sday, March 08, 2006 11:10 PM
To: Dave Pullin
Cc: mysql@lists.mysql.com
Subject: Re: Aggregate functions in ORDER BY
Many thanks for that Dave.
Do you know whether it's possible for MySQL to return fully qualified
column names by default?
For example, I'd like
lto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 11:10 PM
To: Dave Pullin
Cc: mysql@lists.mysql.com
Subject: Re: Aggregate functions in ORDER BY
Many thanks for that Dave.
Do you know whether it's possible for MySQL to return fully qualified
column names by default?
For ex
Can you run without the Order By at all? If not, you may need to
properly join the tables.
I could reproduce the issue with MySQL 4.1 as well and I would go around
it myself by creating a temporaty table, populating it with the
aggregate, doing a select on the temp table and then of course droppin
Many thanks for that Dave.
Do you know whether it's possible for MySQL to return fully qualified
column names by default?
For example, I'd like
select * from foo;
to return
++--+
| foo.a | foo.b|
++--+
| 1 | Rex |
| 2 | Buddy|
| 3
All you are doing when you quote the expression like `COUNT(pets.pet_id)`
is referencing the column in the select by its default column name (which is
the same as the expression.)
That's why it only works when the expression is a column.
If you dont want the order by column to appear in the result