You can try something like this (tested with Firebird 2.5):
SELECT * FROM TABLE WHERE (IIF(FIELD IS NULL, 'Y', 'N') = :IS_NULL)
then pass 'Y'or 'N'to the parameter IS_NULL.
Depending on the database you are using, you may need to replace it IIFwith CASEor a similar design.
source
share