Created attachment 147992 [details] test file Hello, When using the Query Wizard, there is a SQL exception. Here the steps to reproduce: 1 - Download the attached spreedsheet "data-test.ods" 2 - Open Base > Connect to an existing database > Spreadsheet 3 - Select the data-test.ods and create the database 4 - Select Queries > Use Wizard to Create Query 5 - Double Click on "Contrat" in "Available fields", "Contrat" moves to "Fields in the Query" 6 - Click on Finish -> You get the SQL error The error appears only with the fields "Contrat" and "Service d'affectation". For the others fields, there are no SQL exception. Sincerely, Jean-Sébastien
Confirming with Version: 6.3.0.0.alpha0+ Build ID: 608cd2cfe9c82855360c94d629eaac7a76ae212a CPU threads: 4; OS: Mac OS X 10.14.2; UI render: default; VCL: osx; Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US Calc: threaded The error message contains further details: SQL Status: HY000 Error code: 1000 syntax error, unexpected INVALIDSYMBOL, Unterminated name string: "" Looks like the parser is getting confused by the space character at the end of the column name "Contrat ". SELECT "Employés"."Contrat " AS "Contrat " FROM "Employés" "Employés" If you edit the Calc document to remove that space, close LO and reload the ODB file, the query operation works successfully. I suppose it is debatable whether LO should be able to parse space characters at the end of strings intended to be field names, but I would be inclined to say that it should not, and that this is a user error.
I submitted a fix HERE: https://gerrit.libreoffice.org/#/c/65851/
Dear Jean-Sebastien Bevilacqua, This bug has been in ASSIGNED status for more than 3 months without any activity. Resetting it to NEW. Please assigned it back to yourself if you're still working on this.
Created attachment 160515 [details] test case with embedded firebird
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b6ab865a371f5c46f96d931721f03afde82b7ec1 tdf#122461 SQL identifiers (names) can contain newlines It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/ede39fd49c03f2f604507bb1b79ac32fe52da493 tdf#122461 SQL identifiers (names) can contain newlines It will be available in 6.4.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.