Subject Re: [firebird-support] Re: Bug or feature (left join)
Author Arno Brinkman
Hi,

> Makes sense... kind of.
> IMHO the JOIN ON clause should be used only to define relation between
> tables. The TAB_Graafik.Kuupaev field isn't part of the relation, it's
> a part of the filter and thus belongs into WHERE. So in my head I
> "compiled" it like "no matching TAB_Graafik.Kuupaev for given month so
> it is NULL and OR(TAB_Graafik.Kuupaev IS NULL) takes care of it".
> Do other (major) RDBs work like FB in such a case? Or is this modus
> operandi even SQL standard?

Yes, other RDBMs work the same.
First you join all TAB_Graafik records based on UID.
There's at least 1 record in TAB_Graafik that can JOIN with TAB_Tooleping on UID = 2 (as you wrote
the relation between TAB_Graafik and TAB_Tooleping).
This meant there won't be NULLs for Kuupaev at time when the WHERE clause is evaluated, because
Kuupaev in your example will hold '2006-09-20'.

First the JOINs are made and second the WHERE clause is applied.

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development support:
http://www.databasedevelopmentforum.com

Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info

--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
819 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!