Subject RE: [firebird-support] Re: multiple inserts in trigger
Author Sasha
> I would have never thought of that, great idea and greatly
> appreciated. I
> assume that distinct understands the NULL state.
>
In a nutshell yes, but you must understand that if(a = b) will never return
true if either a or b is null and that's by design.
If you want to test for nulls you must rewrite it like this:

if ((a is null and b is null) or a=b) then -- your test condition might be
different
begin
-- something
end else
begin
-- something else
end

or simpler like this:

if (a is not distinct from b) then
something;
else
something else

I think is [not] distinct was introduced in FB 2.0.0 so if you are running
earlier version you will not be able to use it, but you should check on
that.

Sasha