Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||Wrong Where clause generated|
|Component:||code||Assignee:||AOO issues mailing list <issues>|
|Status:||UNCONFIRMED ---||QA Contact:|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description Jens611 2012-05-31 15:23:49 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.
Comment 1 r4zoli 2012-06-02 16:18:31 UTC
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.
Comment 2 r4zoli 2012-06-02 16:19:04 UTC
Invalid -> Closing.
Comment 3 Jens611 2012-06-03 08:32:21 UTC
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!
Comment 4 r4zoli 2012-06-06 19:17:49 UTC
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?
Comment 6 Jens611 2012-06-07 07:19:03 UTC
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!
Comment 7 r4zoli 2012-06-07 14:46:36 UTC
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.
Comment 8 Jens611 2012-06-08 07:17:42 UTC
You are partly right: The wizard cheats, when allowing entry of data but doing nothing. At least an error message is expected here!