join table condition not working correctly

Avatar
  • updated
  • Under review

Hi,

I am using PostgreSQL databsae.

I have the following:

table A (id int, run_dt date , vrsn_num int, metric_1 varchar, attr_2 varchar);

primary key (id, run_dt, vrsn_num)

table B (id int , run_dt date, vrsn_num int, id_2 int , attr_5 varchar , attr_1 varchar);

primary key (id, run_dt, vrsn_num, id_2)

foreign key (id, run_dt, vrsn_num) references table A ((id, run_dt, vrsn_num)

when I drag the tables A and table B on to the Query builder, the default join condition is not built correctly

table A inner  join table B  on (table A.id = table B.run_dt and table A. run_dt = table B . vrsn_num and table A.vrsn_num -=  table B . id)

How do I ensure that the default join condition is built correctly ? Is this a bug?

 

 

Avatar
Anonymous

Hello, Kiran.

 

We've failed to reproduce this issue. What version of FlySpeed SQL Query do you use? Can you send me the exact DDL statement of these two tables?

Avatar
Anonymous

Hello, Kiran.

 

If the problem persists, please provide the steps to reproduce the problem.