How can we help you today? How can we help you today?

extraneous foreign key relationships shown after join .. on

When typing a query that involves several tables, the popup after typing "on " contains all of the relationships between the tables used so far in the query, rather than just the relationships between the most-recently-joined table and the others.

For example, with these tables:
create table a(a_id int not null primary key)
create table b(b_id int not null primary key, a_id int not null foreign key references a(a_id))
create table c(c_id int not null primary key, b_id int not null foreign key references b(b_id))

Typing this code
select *
from a
join b on b.a_id = a.a_id
join c on
causes a popup with
b.a_id = a.a_id
c.b_id = b.b_id


The popup should either:
  • show only foreign key relationships that involve the most-recently-joined table, e.g.
    c.b_id = b.b_id
    
  • show the relationships involving the latest table first, a spacer, and then the rest of the relationships, e.g.
    c.b_id = b.b_id
    ---------------
    b.a_id = a.a_id
    
bis
0

Comments

1 comment

  • Bart Read
    Hi bis,


    Thanks for posting this. Agreed: the current functionality is not satisfactory. Expect to see this significantly improved in SQL Prompt 3.


    Many thanks,
    Bart Read
    0

Add comment

Please sign in to leave a comment.