Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Developer "disconnected from the rest of the join graph"

I have the following SQL:

select <misc things>
from pluspbillline 
left outer join workorder 
    on workorder.siteid=pluspbillline.siteid 
    and workorder.wonum = pluspbillline.refwo
    and workorder.orgid = pluspbillline.orgid
left outer join ticket
    on ticket.ticketid = pluspbillline.ticketid
    and ticket.class=pluspbillline.ticketclass
left outer join pluspsalesorder
    on pluspsalesorder.salesordernum=pluspbillline.salesordernum
    and pluspsalesorder.siteid=pluspbillline.siteid

In Oracle SQL Developer 4.0.0.13 (connected to a DB2 database), I get a squiggly line underneath the following italics: "from pluspbillline" and "left outer join workorder".

The warning says "pluspbillline is disconnected from the rest of the join graph". What does this mean?

like image 667
ESP Avatar asked Nov 27 '13 12:11

ESP


People also ask

What does (+) mean in SQL JOIN?

The plus sign is Oracle syntax for an outer join. There isn't a minus operator for joins. An outer join means return all rows from one table. Also return the rows from the outer joined where there's a match on the join key. If there's no matching row, return null.

How can I keep Oracle SQL Developer from closing the DB connection?

Oracle Net can be configured with Dead Connection Detection (SQLNET. EXPIRE_TIME) to workaround this problem. Set EXPIRE_TIME on the database server to a value less than the firewall connection timeout so that DCD keeps the connection to the database alive.


1 Answers

I got this as well. I'm not exactly sure how to articulate it but the error seems to be based on the logical flow of the code.

Essentially because you mention the table pluspbillline before workorder I think it expects the join to be on pluspbillline.siteid=workorder.siteid etc.

It seems that the order of the conditions for joins should flow from the first identified tables to the latest ones. So the following should make it happy:

plusbillline to workorder       on pluspbillline.siteid=workorder.siteid...
    ""       to ticket          on pluspbillline.ticketid = ticket.ticketid...
    ""       to pluspsalesorder on pluspbillline.salesordernum = pluspsalesorder.salesordernum...

I don't believe this would change the work oracle does (assuming you don't use optimizer hints) so I'd only bother to change if you hate the squiggly lines.

like image 192
Ewanw Avatar answered Oct 17 '22 23:10

Ewanw