Apache OpenOffice (AOO) Bugzilla – Issue 107767
left/right join in designer returns an error
Last modified: 2010-12-02 14:07:14 UTC
I have JDBC connection to a PostgreSQL database using org.postgresql.Driver. On this database I want to left/right join 2 tables using the designer to build the query: I add the two tables to the work area, drag the column from the first over the column of the other to create a join, then right click on the connecting line, click on edit and choose instead of the default type "inner join", "left join". When I try to run the query I get: SQL Status: 42601 ERROR: syntax error at or near "{" Position: 75 The query in the sql editor looks like: SELECT "table1"."bla", "table2"."blabla" FROM { OJ "public"."table2" AS "table2" LEFT OUTER JOIN "public"."table1" AS "table1" ON "table2"."refid" = "table1"."refid" } Which of course is incorrect syntax. Correcting the query make is work: SELECT "table1"."bla", "table2"."blabla" FROM ( "public"."table2" AS "table2" LEFT OUTER JOIN "public"."table1" AS "table1" ON "table2"."refid" = "table1"."refid" )
This issue can be observed on Windows XP on OOO311 as well.
@ lucianpricop If you use the Advanced Properties dialog (Edit>DataBase>Advanced Properties) to disable the option: "User outer join syntax {OJ}" Does this rectify the situation? Thanks
Yes, that rectifies the situation. But perhaps it would be better if instead of a nasty error, the designer would suggest this fix. Thank you
Closing.