M. A. Sridhar
2006-07-17 17:20:35 UTC
Hello,
Here is a query that produces a strange error:
select Address.city as atr_0, count(Address.line_1) as atr_1 from Address,Product where Product.address = Address.address_id and Product.inactive = '0' and Product.orgName = 2 group by Address.city order by 1,2
The error is:
'count' can only be used as an aggregate function.
But if I remove the '2' in the order by clause, the problem goes away. This means that Mckoi cannot order by aggregate functions, it seems. I'm rather surprised. Any comments? Fixes/changes?
Thanks in advance.
M. A. Sridhar
m_a_sridhar at yahoo dot com
Here is a query that produces a strange error:
select Address.city as atr_0, count(Address.line_1) as atr_1 from Address,Product where Product.address = Address.address_id and Product.inactive = '0' and Product.orgName = 2 group by Address.city order by 1,2
The error is:
'count' can only be used as an aggregate function.
But if I remove the '2' in the order by clause, the problem goes away. This means that Mckoi cannot order by aggregate functions, it seems. I'm rather surprised. Any comments? Fixes/changes?
Thanks in advance.
M. A. Sridhar
m_a_sridhar at yahoo dot com