Subject Re: [firebird-support] aggregate product() or equivalent
Author unordained
Ann, thanks for the reply.

I don't suppose there's any way the plugin part of Firebird could be enhanced to allow aggregate
UDF's? (That would leave triggers as a non-UDF-able thing, but a UDF seems easier to wrap in that
case. Anything else non-UDF-able?)

But yeah. Stored procedure, maybe a view to make it pretty. Oh well.

Thanks,
-Philip

---------- Original Message -----------
From: "Ann W. Harrison" <aharrison@...>
> unordained wrote:
> > Is there an aggregate function that multiplies all non-null values to provide a result?
>
> No...
> > If not, is
> > it possible to write aggregate functions as UDF's?
>
> Not really. UDF's work on a single set of inputs - they can't accept
> input record streams.
> > This would be
> > to use in a select with group-by, to find total ratios for several items at once, based on the
> > product of component ratios.
> >
>
> You're probably going to have to put the whole operation in a stored
> procedure.
>
> Regards,
>
> Ann
------- End of Original Message -------