Originally posted by Bijan
Well, I tested my query on a real DB and it worked!!
Just a short note: I'm again too sleepy to do the query in mind :o , but your idea seems to be quite right as through the '=' nulls are not included (i think), which was presumably the flaw in my second query 😃
But what i don't like is the AND in the query... these indicate (on implicit joins) a cartesian product, which means every row in the first table is linked with every row on the second. That leads, if you are unlucky and your DB is rather big, to exorbitant temporary tables the WHERE-clause is then applied to, e.g. 1.000.000 rows if each table has 1000 entries... (some DBMS do optimization, though)
But it's definately possible to break this down to a join (it's always).
Otherwise, GOOD WORK!
😃 😃 😃