Subject Re: [firebird-support] View limitations
Author Alexandre Benson Smith
Hi Ivan !

Ivan Prenosil wrote:
> Alexandre,
>
>> I post a message on fb-architect about an aggregate function that
>> multiplies the column values instead of summing it up.
>>
>> This request could be done using a selectable SP, but I need it working
>> inside views, as you know UDF's is not an option for aggregates, so I
>> have a problem :-)
>>
>
> Perhaps you can add UDFs for logarithm and exponential functions and do this:
>
> SELECT Exp( SUM( Ln(x) ) ) FROM ...
>
> Ivan
> http://www.volny.cz/iprenosil/interbase/
>
>
:-)

I was sure there is a mathematical approach to solve this !

Worked like a charm !

Thank you very much to point it out !

Just a side note.

IB_UDF has LN but misses EXP (there is POWER that could do the job too
if one uses the E value with a good precision)

rFunc UDF provides both (LN and EXP), so I sticked to it


see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br