Subject Re: RES: RES: [firebird-support] Null and parameters
Author Christian Danner
On Sun, 08 Jan 2006 12:52:21 +0100, I wrote:

>For me - within sps - select statements with where clauses including
> (:var is null)
> or (field = :var)
>work great for years.

In PSQL as well as DSQL this does the job for not-null-fields:
where field = coalesce( :var, field)

And there is the general solution considering null-fields:
where (field = coalesce( :var, field))
or (coalesce( :var, field) is null))

So you need neither 'execute statement' nor a sp ;-)

Christian