Subject | Re: [ib-support] Using NULL input parameters in a WITH statement |
---|---|
Author | Ivan Prenosil |
Post date | 2002-11-26T17:39:08Z |
> select a,b,c,d etc.Immediate "solution" (workaround) is to not use NULLs whenever possible.
> from StockTable
> WHERE ((Warehousecode = :InputWarehouseCode) OR (:InputWarehouseCode IS NULL))
(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