From: Paul Vinkenoog <paul@vi...>  20061217 00:32:38

Hi Mimmo, >> The second one is (as I've intended it) >> (A<>Expr1) AND (A<>Expr2) AND ... >> which is NULL AND NULL AND NULL... >> then the result is NULL directly, >> and not "not NULL" that is "NULL" > Maybe this are only academic thoughts, Yes, but interesting enough! > ...but the only thing that I must observe, is that Firebird is > consistent if and only if always A NOT IN () <=> NOT (A IN()) > If they differs sometimes or somehow, or better, this is not as > defined, then in case of > ? If none of the expressions in the list equal A (and list contains > 1 or more NULLs): You're right that this is the trickiest one: A not null && A not in list && list contains null >  ?A IN( Expr1, Expr2, ..., ExprN )? returns NULL >  ?A NOT IN( Expr1, Expr2, ..., ExprN )? returns NULL > the second expression should then return False if any of the ExprN > is not null. No, let's write it out (for this particular situation): IN( e1, e2 ... en ) <==> A=e1 or A=e2 ... or A=en <==> false ... or null ... or false // never true, A not in list <==> null NOT( IN( e1, e2 ... en )) <==> NOT( null ) <==> null A<>e1 and A<>e2 ... and A<>e // "your" interpretation of NOT IN <==> true ... and null ... and true // never false, A not in list <==> null So whether you interpret NOT IN() as NOT( IN() ), or as a conjunction of inequality tests, the outcome is the same. Greetings, Paul Vinkenoog 