Subject Re: [ib-support] contradictory behaviour with nulls
Author Ivan Prenosil
> From: "c_pradelli" <c_pradelli@...>
> I know that the followin query do not return records where the FIELD1
> is NULL:
>
> SELECT * FROM MYTABLE WHERE NOT (FIELD1 IN ('100'))
>
> I really don't agree with this but, everybody says that it is ok.
>
> BUT,
>
> if you run the following query it return records with NULL value in
> FIELD1:
>
> SELECT * FROM MYTABLE WHERE NOT (FIELD1 IN (SELECT FIELDX FROM
> OTHERTABLE))
>
> isn't this contradictory?

What is the contents of OTHERTABLE ? Is it empty ? Does it contain NULL values ?
Is FIELDX indexed ?

Ivan
http://www.volny.cz/iprenosil/interbase