Subject Re: [ib-support] Using NULL input parameters in a WITH statement
Author Ivan Prenosil
> select a,b,c,d etc.
> from StockTable
> WHERE ((Warehousecode = :InputWarehouseCode) OR (:InputWarehouseCode IS NULL))

Immediate "solution" (workaround) is to not use NULLs whenever possible.
(If Warehousecode is Varchar, use empty string instead of Null)

Better solution would be to implement new null-aware comparison operator.
E.g.
NULL === NULL
would return TRUE. Such operator would also be extremely handy
in replication and logging triggers.


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