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

>> If you feel you really must
>> put them in the WHERE clause, you must allow null values for the
>> referenced fields.
>
> I think I do!
> See my original query, there I have
>
> LEFT JOIN TAB_Graafik ON(TAB_Graafik.Tooleping = TAB_Tooleping.UID)
>
> and in the WHERE I have condition
>
> (((TAB_Graafik.Kuupaev<='31.10.2006')AND(TAB_Graafik.Kuupaev>='01.10.2006'))OR(TAB_Graafik.Kuupaev
> IS NULL))
>
> but this query doesn't return record from TAB_Tooleping which don't
> have record in TAB_Graafik in given date range. But date range is ORed
> with IS NULL condition, so it should!

Which Firebird version (1.5.1 or 1.5.3 or 2.0.0, ....) are you using.
Looking at the query it should work.

BTW, You can use parameters in the ON clause.

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
780 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!