On Tue, Jun 30, 2009 at 01:14:10PM +0200, Waldemar Bergstreiser wrote:
> I found a good explanation about informix outer joins.
>
> http://savage.net.au/SQL/outer-joins.html
>
> Please take a look at that.
The syntax appears to make the expression of various idioms difficult;
for example, how would I express the following:
SELECT *
FROM a LEFT JOIN b ON a.id = b.id
WHERE b.id IS NULL OR a.c <> b.d;
Admittedly I don't write code like this very often but, yes, I have used
it on some occasions. I guess I'd have to resort to a subselect?
I believe this is what Tom was referring to when he said that "there's
no principled way to decide what it *means*". For example the semantics
of the above are very different from either of:
SELECT *
FROM a LEFT JOIN b ON a.id = b.id OR a.c <> b.d
WHERE b.id IS NULL;
or:
SELECT *
FROM a LEFT JOIN b ON a.id = b.id AND (b.id IS NULL OR a.c <> b.d)
and I can't think of any other formulations after reading the link you
gave---it only seems to talk about binary operators involving columns
from two tables. Second shouldn't be allowed, but I included it in case
I was missing something.
--
Sam http://samason.me.uk/