Subject | Re: RES: RES: [firebird-support] Null and parameters |
---|---|
Author | Christian Danner |
Post date | 2006-01-09T10:59:46Z |
On Sun, 08 Jan 2006 12:52:21 +0100, I wrote:
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
>For me - within sps - select statements with where clauses includingIn PSQL as well as DSQL this does the job for not-null-fields:
> (:var is null)
> or (field = :var)
>work great for years.
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