Apache OpenOffice (AOO) Bugzilla – Issue 88394
Editing a query in design view causes an SQL error
Last modified: 2008-05-05 13:02:18 UTC
Steps: I open a query in design view I make an alteration, say change the position of a column I try to close the query saving the changes I get a "Syntax error in SQL expression" message: SQL Status: HY000 Error code: 1000 This seems to have started happening since I upgraded to OOo 2.4.0 (in Debian Lenny)
cannot reproduce. Care to add more information about your distribution, your OOo version (the one from www.openoffice.org or the distribution's version?). Best would be if you attach a small sample database which allows to reproduce the problem.
The problem seems to arise when there is a POSITION function in the SQL. I will attach a sample database. The version is this one: http://packages.debian.org/lenny/openoffice.org .
Created attachment 53032 [details] Sample database
Can reproduce with the attached sample database - thanks for providing it. Confirming, assigning, adding "regression" keyword. Targeting to 2.4.1. Note this is still subject to approval by the Release Status Team.
The statement in the query contains an error which we accepted in 2.3.1. You have to change it like SELECT "Data"."ID", "Data"."CustomerID", "Data"."Town", "Data"."Telephone", "Map"."Description", "Data"."MoreData" FROM "Map" AS "Map", "Data" AS "Data" WHERE "Map"."CustomerID" = "Data"."ID" AND POSITION( 'i' IN "Town" ) <> 0 The function POSITION returns an integer and is compared in the example with a String. When you change that one into an Integer all went well. Best regards, Ocke
=> close