[Libreoffice-bugs] [Bug 32958] query design: once a join has two fields, cannot go back to one field
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Jan 10 05:41:52 PST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=32958
--- Comment #1 from Lionel Elie Mamane <lionel at mamane.lu> 2011-01-10 05:41:52 PST ---
Create a new query, using a join on two (or more) fields on _each_ side of the
join.
For example:
SELECT A.foo, B.bar FROM A INNER JOIN B on A.f1=B.f1 AND A.f2=B.f2
Edit the query in Design View.
Double-click on one of the two lines representing the join (making the
connection between two tables).
Remove one field from the join, by selecting "blank" instead of a field name in
one of the lines describing the join (on both sides of the join).
Notice that the line does not go away but stays blank.
Save, try to execute the query, error because LibreOffice tries to use an empty
column name.
For example, with MySQL one gets:
Unknown column 'A.' in 'where clause".
View the query in SQL, it looks like:
SELECT "A"."foo", "B"."bar" FROM "db.A" AS "A", "db.B" AS "B" WHERE
"A"."f1"="B"."f1" AND "A".""="B".""
Notice the empty column name
Go back to design view. The query now works.
Go back to SQL view. The query now looks like:
SELECT "A"."foo", "B"."bar" FROM "db.A" AS "A", "db.B" AS "B" WHERE
"A"."f1"="B"."f1" AND "A"."f1"="A"."f1"
Notice the second clause has become a tautology.
In the design view, it is shown as a join of the table A upon itself.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Libreoffice-bugs
mailing list