Subject Re: [firebird-support] Re: Why NULL <> NULL ?
Author Helen Borrie
At 12:08 AM 19/05/2006, you wrote:
>--- In firebird-support@yahoogroups.com, "Martijn Tonies"
><m.tonies@...> wrote:
>
> > If you want to compare for the state as well, you have
> > to modify your code OR use the COALESCE function
>
>if (field1 is null or field1 = field2) then ...
>this statement always returs false even if field1 = null :(

It will return true if field1 and field2 are both values and they are
equal and ALSO if field1 is null (regardless of what is in
field2). If you get a different result then we are all in trouble
and the sooner you post a test case the better the world will be.

>even this returns always false:
>if (not field1 <> field2) then ...

It's not a test you would ever make (it's senseless) but again, if
you are able to produce a test case that demonstrates your assertion,
do so, the sooner the better.

>As I think this should be fixed in future fb releases.

If it's broken, it has to be fixed. :-)

./heLen