Toad World® Forums

Query builder issue


#1

Hi,
there is table ‘odciecia’. column status_id references table status and column
od_stan_zamkniecia references
table status [but it is not the same fkey]. QB shows it correct, but if I add
any column do field list I get following query:

SELECT ODCIECIA.OD_NUMER, STATUS.ST_NAZWA
FROM PHOBOS.dbo.ODCIECIA ODCIECIA
INNER JOIN
PHOBOS.dbo.STATUS STATUS
ON (ODCIECIA.OD_STAN_ZAMKNIECIA = STATUS.STATUS_ID)
AND (ODCIECIA.STATUS_ID = STATUS.STATUS_ID)

Which is NOT correct. Imho in such situation [quite common], QB should add to
diagram 2 instances of table status.
[like below]


Butter

int_1.jpeg

int_2.jpeg
int_1.jpeg


#2

Hello Marcin,

From our perspective this works as designed. We can’t guess what
configuration of relations user wish. You can remove and add relations. You can
add same table twice. Let’s say this is just as a good start point if you
are not sure about join type for this moment.

As a solution, I can advise you to uncheck option ‘Automatically join
tables with relationships’ if it would more convenient for you

Regards, Nadezhda Shoshina
int_1.jpeg


#3

Hello Marcin,

From our perspective this works as designed. We can’t guess what
configuration of relations user wish. You can remove and add relations. You can
add same table twice. Let’s say this is just as a good start point if you
are not sure about join type for this moment.

As a solution, I can advise you to uncheck option ‘Automatically join
tables with relationships’ if it would more convenient for you

Regards, Nadezhda Shoshina
image002.jpeg


#4

Hello Marcin,
From our perspective this works as designed. We can’t guess what configuration
of relations user wish. You can remove and add relations. You can add same table
twice. Let’s say this is just as a good start point if you are not sure about
join type for this moment.

What about add a new facility for relation’s context menu: convert to synonim
[or something about this name].
Item available if target table is referenced by more then one relation form the
same table.


Butter


#5

Hello Markin,

Thank you for suggestion. I’ve created ER 82952

Nadezhda Shoshina

Nadezhda.Shoshina@quest.com

Phone: 332-03-00, ext. 285

DM Group

Senior SW Quality Engineer

Quest Software, Inc.