tags:

views:

44

answers:

3

I have this db with lots of tables and frequently I have to answer the question: Why is entry x not being shown?

Often I have an idea which entry might be the reason, but more often its wild guessing and trying.

This gets boring after some time. Is there a tool out there where I enter the joins and the key of the entry that I want to have and the tool tells me: This entry stops to have joins in table x.

+2  A: 

Just include a column from every join in the query. The first column that is NULL will be the first join that fails.

Andomar
But there is no row - isn't it ?
Dani
I think he might have meant LEFT JOIN
astander
+3  A: 

Make a new select statement and change INNER JOINs to OUTER JOINs and add 'where id=foo' to pick out the object you are interested in. Look for NULLs in the result.

Mark Byers
+3  A: 

Another suggestion is to change the JOIN (which is INNER by default) to a LEFT JOIN one-by-one.

Robert W