Apache OpenOffice (AOO) Bugzilla – Issue 119642
Wrong Where clause generated
Last modified: 2013-01-29 21:47:04 UTC
When creating a query with the wizard and omitting a value in the equations area the where clause is not generated at all. Instead of the table name appears.
Query wizards work this way, where clause created when value added in 3rd step. Without the value the WHERE caluse is meaningless, for that reason not added. The Table name alias created any way. You can edit your query in SQL mode and add WHERE clause.
Invalid -> Closing.
The problem is that a syntactically wrong sql statement is generated in that case: e.g. select * from tab1 tab1 So the bug has to stay open/unsolved!
The select * from tab1 tab1 is correct SQL, you can left out the AS clause in alias. This error was corrected several version earlier. This not happens with my win7 32 bit version of AOO 3.4 This happens in AOO 3.4? You use odb file with connection to external database, or use standalone file?
Created attachment 78107 [details] Wizard's screen
I use standalone database. I'm still confused by the wizard's behaviour. If I create a query with an empty field Belege.Art: https://issues.apache.org/ooo/attachment.cgi?id=78107 I also expect the wizard to create a search for rows with the field being empty, i.e. select * from Belege where Belege.Art ='' Instead of that the query is neglected!
Now it is clear to me, you want add parameter query, when you added empty field into query wizard. Use :parameter in wizard, it will ask for input.
You are partly right: The wizard cheats, when allowing entry of data but doing nothing. At least an error message is expected here!