Apache OpenOffice (AOO) Bugzilla – Issue 123199
Query wizard doesn't save search conditions
Last modified: 2015-11-07 19:05:43 UTC
Created attachment 81465 [details] Test base file The Base Query Wizard does not apply search conditions. Steps to reproduce: 1. Download the attached example file. 2. Create a new query with the query wizard. 3. Add the "Size" field to the query, then click 'Next >'. 4. Ignore the sorting order - click 'Next >'. 5. For search conditions, choose the "Table1.Size" field, condition "is equal to" value "3". 6. Then click 'Finish'. Notice that the results are not filtered. The resulting SQL query that the wizard makes is -- SELECT "Table1"."Size" AS "Size" FROM "Table1" "Table1" -- An alternative set of steps, that results in a different error: Follow steps 1-5 above. 6. Click 'Next >' (instead of clicking 'Finish'). 7. Click '< Back'. Notice that the search conditions are all empty. If you enter in a search condition now, and then hit 'Finish', then there is an SQL error: --- Syntax error in SQL expression SELECT "Table1"."Size" AS "Size" FROM "Table1" "Table1" WHERE (Size = 3) --- The error seems to come about because the field name in the WHERE is not enclosed by double-quotes.
Confirming with latest SVN on FreeBSD.
There were multiple problems here: size is a reserved word and several columns contain spaces, leading to a failure to filter since quoting is broken when building the query. Those problems were fixed in #126029. Now the remaining problem is that size isn't quoted in the WHERE clause.