Subject Re: [firebird-support] Unsupported parameter into SQL expression
Author masotti
Svein Erling Tysvær ha scritto:
> I guess the reason why this doesn't work is because the datatype of the parameter is unknown. Using CAST directly to the parameter doesn't seem to work with Firebird 1.5 - I assume this is due to not knowing which datatype to cast from(!), but with Firebird 1.5 (it might work on newer Firebird versions, that's just the version I have at hand currently), you should be able to do something like
>
> select art_codice, quantita, prezzo, prezzo / 100 * coalesce(cast(null as Integer), :sconto)
> from mmr
>
> I started this reply before Mimmo sent his, but with Firebird 1.5
You're right: I tried with 2.1.2 and IBExpert.
Don't remember for sure when this changed, but I've not a 2.0 version at
hand to test it now.

Ciao.
Mimmo.