Drew wrote:
This seems to me the appropriate situation for using OUTER JOINs, but I
cannot figure out how to get the null rows without the not-null rows.
However, when I try to exclude the one not-null row, doing this:
SELECT
s.source_id,tp.translation_pair_id,t.translation_id,t.language_id, l.name
FROM (select * FROM source s WHERE source_id = 159986) AS s
LEFT OUTER JOIN translation_pair tp USING(source_id)
LEFT OUTER JOIN translation t ON tp.translation_id =
t.translation_id AND t.translation_id IS NULL
RIGHT OUTER JOIN language l on l.language_id = t.language_id;
Ah, you need to put the "IS NULL" outside the join.
SELECT
...
WHERE
s.source_id IS NULL OR tp.translation_pair_id IS NULL OR ...
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings