Apache OpenOffice (AOO) Bugzilla – Issue 28531
Query with aggregation functions are not parsed correctly
Last modified: 2006-05-31 14:29:06 UTC
I find a big problem trying to run a query in OOo 1.1.1 against MySQL 4.0.18 (the jdbc driver is the last stable: mysql-connector-java-3.0.11-stable) It seems as OOo does not parse SQL queries if aggregation functions are used, like SUM(...), COUNT(...) followed by the relative GROUP BY istruction. A query like this (on a single table, "movim"): SELECT codart, SUM(qtacar) AS totcar, SUM(qtasca) AS totsca FROM movim GROUP BY codart is perfectly executed and returns the expected results if run from within MySQL (or using tools like phpmyadmin, MySQL Control Center or others); if run from OpenOffice.org, instead it returns the followin error message (it's in italian, i try to translate it the more correctly i can do) General error, message from server: "The promiscuous use of aggregation functions (MIN(),MAX(),COUNT()...) and it is not illegal if there's not a GROUP BY clause" I think the error message have not sense, and moreover, the "...and it is not illegal if..." sentence looks like an error in the error. If the query is executed in OOo in the SQL Native Mode, then it works (this confirm, bypassing OOo that it's correct). But if i save the query in OOo in native mode i cannot use it in any form, because any field to use is returned. Is it a serious bug or am i missing something ? Thank you. Ciano
I found an english translation with Google for the error message i talked about: Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause
This is a duplicate of issue 27286 *** This issue has been marked as a duplicate of 27286 ***
close issue