Three tables in a query. When changing the join between the tables to "LEFT JOIN" (could also be RIGHT JOIN) the graphic interface makes "FROM table1 LEFT OUTER JOIN table2 LEFT OUTER JOIN table3 ON ..." Must be: FROM table1 LEFT OUTER JOIN table2 ON ... LEFT OUTER JOIN table3 ON ..."
Do you reproduce this problem on a brand new document with a newer version (3.5.0 for example) ? If yes, could you please attach a example file (so it's possible to test more quickly) ? Have you got warn or error messages in console ?
I have tested it with a new database under 3.5.0. Now it works. No problem at all with two joins. Well done! Solved in 3.5.0.
Since you confirm it's ok on 3.5.0, I put it RESOLVED/WORKSFORME (I hesitated with FIXED but we don't know what did fix it).
I have to reopen this bug. In a German forum appears the same wrong query with LO 3.5.* - so I tested again with LO 3.5.7.1., 3.5.0 and 3.5.0rc1. The bug is already there. I couldn't explain what I had tested in comment 2.
Created attachment 68924 [details] test with 3.6 Robert: Attached a very basic test file made with 3.6 sources updated yesterday. 3 tables with some data 2 queries: - original one - with right join What do you think?
Created attachment 68956 [details] Two queries with two joins - query of GUI didn't work. @comment 5: The problem appears, when you create a query with two joins, not only one. The GUI creates every time the procedure: first the tables, then the definition of the relations. This works for a normal "join" like FROM table1, table2, table3 WHERE table1.nameID = table2.ID ... This doesn't work for right or left joins. There it must look like FROM table1 LEFT JOIN table2 ON table1.nameID = table2.ID LEFT JOIN table3 ON ... When a query is created with "JOIN" there must be a definition of the relation directly after the definition of a join.
*** Bug 57749 has been marked as a duplicate of this bug. ***
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c25bb400bbfe20b3b13237ed10935ec9d0f6d769 fdo#42165 make nested joins as per strict ANSI SQL The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Backport to 3.6.x line pending review; see https://gerrit.libreoffice.org/1225 If all goes well, should be part of 3.6.5. Too late for 3.6.4.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1cac399e063827349c340cafdec8dc0756f90f1b&g=libreoffice-3-6 fdo#42165 make nested joins as per strict ANSI SQL It will be available in LibreOffice 3.6.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.