Subject | Re: [firebird-support] Backporting query to Firebird 1.5 |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2008-10-03T12:56:03Z |
Harriv escreveu:
if you never pass NULL.
Adriano
> Hi,Not nice, but if you replace "?" by a "coalesce(null, ?, 0)" should work
>
> I have this query which works with Firebird 2.1:
>
> SELECT * FROM TABLE WHERE TIMESTAMPFIELD > (CURRENT_TIMESTAMP - CAST(?
> as DECIMAL(18,9))
>
> However, if I try to execute this in older system with Firebird 1.5,
> I get "Unknown data type" error. I tried different variations of CAST,
> but couldn't find out the working combination since I don't quite
> understand the problem. Any ideas how to fix this?
>
if you never pass NULL.
Adriano