I have a query I want to run against h2 but it uses MEDIAN() in the
sql.  I noticed that MEDIAN is not a function supported out of the box
by h2.

If this is true, has anyone implemented a custom MEDIAN function and
plugged it in as an aggregate function?  If so, do have some sample
code?  In the example below I would like to see the underlying code of
the com.acme.db.Median class looks like.  Thanks in advance for any
help!

I see this in the ref docs....


CREATE AGGREGATE

CREATE AGGREGATE [IF NOT EXISTS] newAggregateName FOR className

Creates a new user-defined aggregate function. The method name must be
the full qualified class name.
The class must implement the interface org.h2.api.AggregateFunction.
Admin rights are required to execute this command.
Example:
CREATE AGGREGATE MEDIAN FOR "com.acme.db.Median"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to