SQL Developer “disconnected from the rest of the join graph”

后端 未结 4 1669
死守一世寂寞
死守一世寂寞 2020-12-18 19:49

I have the following SQL:

select 
from pluspbillline 
left outer join workorder 
    on workorder.siteid=pluspbillline.siteid 
    and wor         


        
相关标签:
4条回答
  • 2020-12-18 19:52

    The issue is caused by the Oracle Procedure having the same named input parameter as the column on the table you are joining to.
    i.e input parm named bank_nbr and a table BankDept.bank_nbr will cause the error if you have WHERE bank_nbr = BankDept.bank_nbr I solved the issue by renaming the input parameter to in_bank_nbr and updating my where to read WHERE in_bank_nbr = BankDept.bank_nbr

    0 讨论(0)
  • 2020-12-18 19:53

    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.

    0 讨论(0)
  • 2020-12-18 19:56

    I had the same message when hovering over the "LEFT" word, but the whole query ran without a problem. On the other hand, when I hovered over "WITH", I got a piece of advice about restructuring the whole query. So, that message about disconnection could be not a sign of an error, but a warning about a too complex sentence. SQLDeveloper's editor does not mention the level of the problem.

    0 讨论(0)
  • 2020-12-18 20:12

    I'm not sure what's causing Oracle SQL Developer to give the error. But I'm putting this comment here to format it properly.

    A join graph might look something like this

    pluspbillline  ------+----<  workorder
                         |
                         +----<  ticket
                         |
                         +----<  pluspsalesorder
    

    The lines on the graph might be labeled with the join fields. But this gives you a basic idea.

    I don't see any reason why you are getting this warning. A column name typo in your SQL perhaps? Or some quirk in Oracle's interface that it doesn't understand the DB2 metadata properly? I suggested trying IBM's tool to see if it's merely their program.

    0 讨论(0)
提交回复
热议问题