Subject Re: expression evaluation not supported (FIREBIRD 2.0 RC3)
Author skander_sp
--- In firebird-support@yahoogroups.com, "Dmitry Yemanov" <dimitr@...>
wrote:
>
> "skander_sp" <skander_sp@...> wrote:
> >
> > Creating a computed field (that work fine in 1.5.3) give an error
in 2.0
> >
> > ALTER TABLE S1 ADD BASE COMPUTED BY (
> > cast(
> > coalesce(
> > (select sum(cast(s2.cantidad*s2.Precio as numeric(14,4))
> > *cast((1.0-s2.dto/100)*(1.0-s1.dto/100) as numeric(6,5)))
> > from s2
> > where a1.id = s2.id)
> > ,0)
> > as numeric(14,2)));
>
> What are the datatypes of "cantidad", "precio" and "dto"? It looks
like any
> of them is a string.
>

SURE all or them are numbers (not a problem of tipe missmatch), is
because I operate a field of actual table (S1) in the sum from other
table... this is valid for a standard query, and also for FB 1.5, but
some new restriction appear in FB 2.0, or so...

but I can't found a solution...