Subject Re: [firebird-support] Backporting query to Firebird 1.5
Author Adriano dos Santos Fernandes
Harriv escreveu:
> Hi,
>
> 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?
>
Not nice, but if you replace "?" by a "coalesce(null, ?, 0)" should work
if you never pass NULL.


Adriano