Subject Re: [ib-support] Wish List
Author Claudio Valderrama C.
""todderamaa"" <todd.compass-cama@...> wrote in message
> I was just looking at some documentation about ORACLE and I found that
> it provides additional Aggregate Functions to Count, Max, Min, etc.
> The ones that we would very much like to see are VARIANCE, STDDEV and
> ABS. There are other statistical measures that would be of benefit.

Aren't variance and stddev an expression of sum() and count() basically? You
could do this:

select udf_variance(sum(), count())
from tbl
group by somefield

There's a doco at Borland were it's shown the inconvenience of polluting the
BLR namespace with a lot of statistical and math function and that they are
better implemented in UDFs. What still doesn't make sense in my brain is why
the server commits suicide when a UDF has a math error like a division by
zero. This is by design and I'm in favor of changing it.

In the meantime, I think I've found a nice way to implement abs(), iif(),
coalesce(), isnull() and "case" as native functions without adding new BLR
verbs to the core engine... but this will be for FB2.

Claudio Valderrama C. - -
Independent developer
Owner of the Interbase® WebRing