Subject Re: [IBO] query with NULL parameters
Author Nando Dessena

> >select * from table1 where field1=:param1 and field2=:param2 and .... and
> >fieldN=:paramN

> The NULL parameters are taken into consideration and return the records
> matching your request, even those with NULL.

Not in this case; null cannot be tested for equality (actually, it
cannot be compared at all), so field2=:param2 won't get you the records
that have field2 null whatever you set param2 to.
I agree that OnPrepareSQL/SQLWhereItems is the easiest and more flexible
way to do it.
I do it that way too.