2

when I write this query in sql developer:

SELECT c.* FROM NAMES a ,CLOTHES b ,DATE c
WHERE a.NAME_KEY=b.NAME_KEY
AND b.CLOTHE_LABEL LIKE '%A33005%'
AND c.CLOTHE_KEY=a.CLOTHE_KEY
ORDER BY c.CREATE_DATE;

it does not take b as a part of the join and it displays the message :

B is disconnected from the rest of the join graph.

Do you know why is this happening?

This is different than the other question

Ioanna Katsanou
  • 484
  • 2
  • 7
  • 24
  • This SO-question might be related to this question: [SQL Developer “disconnected from the rest of the join graph”](http://stackoverflow.com/questions/20242329/sql-developer-disconnected-from-the-rest-of-the-join-graph) – Ludricio Jan 10 '17 at 15:03
  • Possible duplicate of [SQL Developer "disconnected from the rest of the join graph"](http://stackoverflow.com/questions/20242329/sql-developer-disconnected-from-the-rest-of-the-join-graph) – Ludricio Jan 10 '17 at 15:03
  • 1
    Does it go away if you use explicit `JOIN` operators instead of the old, outdated and fragile implicit joins in the `WHERE` clause? –  Jan 10 '17 at 15:18
  • maybe it goes away but i want to use this kind of query – Ioanna Katsanou Jan 10 '17 at 15:29

1 Answers1

-1

Proper Order of the tables is also important from the point of query optimisation.

Your query must be as follows

SELECT c.* FROM `DATE` c, CLOTHES b, NAMES a
WHERE c.CLOTHE_KEY=a.CLOTHE_KEY
AND a.NAME_KEY=b.NAME_KEY
AND b.CLOTHE_LABEL LIKE '%A33005%'
ORDER BY c.CREATE_DATE;
Jay
  • 651
  • 1
  • 6
  • 10