Apache OpenOffice (AOO) Bugzilla – Issue 27286
SQL parse problem with GROUP BY clauses
Last modified: 2006-05-31 14:29:06 UTC
I've just upgraded to v1.1.1 and one of my database forms has stopped working. The error complains: [MySQL][ODBC 3.51 Driver][mysqld-3.23.58]Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause --- Error Code 1140 The SQL clause I'm using is: SELECT `Orders`.`order_id`, `Suppliers`.`Full Name`, SUM(`OrderInventory`.`cost` * `OrderedItems`.`quantity`) AS `Total Cost`, `Suppliers`.`currency`, `Orders`.`tvl_order_no`, `Orders`.`date`, `Orders`.`placed_by`, `Orders`.`Status` FROM `Orders`,`OrderedItems` LEFT JOIN `Suppliers` ON `Orders`.`supplier_id` = `Suppliers`.`ID` LEFT JOIN `OrderInventory` ON `OrderedItems`.`Item` = `OrderInventory`.`ID`WHERE (`Orders`.`project` = :budget AND `Orders`.`order_id` = `OrderedItems`.`order_id`) GROUP BY `Orders`.`order_id` As you can see, there clearly IS a GROUP BY clause. The query is for a slave form (with the field ':budget'), hence I must set 'Analyse SQL Command' to YES to correctly parse the master/slave fields. The query works fine if I set 'Analyse SQL Command' to NO and replace the :budget field with something else, but then I don't have the correct link to the master form. Everything worked fine in version 1.1.0
Hi, I can reproduce this. a simple query like SELECT SUM(field1) , id FROM table1 GROUP BY id doesn't work anymore. This regression come in with issue 21125 Bye Marc
Fixed in cws oj12
For you :-)
set to fixed
verifiy in cws oj12
*** Issue 28181 has been marked as a duplicate of this issue. ***
fixed in OOo 1.1.2 which will be available soon -> close Feel free to reopen if this issue is not fixed in the final 1.1.2 build
*** Issue 28531 has been marked as a duplicate of this issue. ***