Issue 64649 - OOo turns INNER JOIN query to WHERE in Design mode
Summary: OOo turns INNER JOIN query to WHERE in Design mode
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.2
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2006-04-22 21:03 UTC by Regina Henschel
Modified: 2013-08-07 15:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

example database (41.40 KB, application/vnd.sun.xml.base)
2006-04-22 21:04 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2006-04-22 21:03:19 UTC
Imagine you have datas with n:m relationship which is resolved to three tables,
like in the attached database.
Go to "Create Query in SQL view..." and create a query with an INNER JOIN, like
query "querymitJoinSQLansicht" in the example. Save it. If you look into the
content.xml, you see the command 
SELECT "de"."BEGRIFF", "en"."ITEM" FROM "de" INNER JOIN "translate" ON "de"."ID"
= "translate"."DE_ID" INNER JOIN "en" ON "en"."ID" = "translate"."EN_ID"

Now use context menu "Edit" for that query. It opens in Design mode. Move the
table-icons a little bit but don't alter the query itself. Save it. I have done
it with the query "kopiezumbearbeiten" in the example. Now look into content.xml
again. You see the command
SELECT "de"."BEGRIFF", "en"."ITEM" FROM "de" "de", "translate" "translate", "en"
"en" WHERE ( "de"."ID" = "translate"."DE_ID" AND "en"."ID" = "translate"."EN_ID

OOo has silently changed your command. That is bad, because, for example for an
Access database connected via ADO, the WHERE version is extreme slow compared
with the INNER JOIN version and makes your query unusable, if the database
contains not only a few records.
Comment 1 Regina Henschel 2006-04-22 21:04:03 UTC
Created attachment 35922 [details]
example database
Comment 2 christoph.lukasiak 2006-04-24 14:59:42 UTC
clu->oj: i can repro that - as i agreed with fs the ui should not change the
code that way (in general)
Comment 3 christoph.lukasiak 2006-04-24 15:01:18 UTC
set target
Comment 4 ocke.janssen 2007-08-24 08:19:34 UTC
@lla:We need an additional setting for this one as well. Please ask before
starting to get some info about it. Thanks.