Subject | Re: [firebird-support] Unsupported parameter into SQL expression |
---|---|
Author | masotti |
Post date | 2009-04-29T08:26:19Z |
Svein Erling Tysvær ha scritto:
Don't remember for sure when this changed, but I've not a 2.0 version at
hand to test it now.
Ciao.
Mimmo.
> 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 likeYou're right: I tried with 2.1.2 and IBExpert.
>
> 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
Don't remember for sure when this changed, but I've not a 2.0 version at
hand to test it now.
Ciao.
Mimmo.