Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> java class wrapper
I wrote the class that computes GCD.
public class GCD {
public static int calcGCD( int[] array ) { /* ... */ }
}
Is it possible tu use it as agregate function in sql. How to write a wrapper
to it?
The problem is in datatypes. I wrote something like:
(n0 number, n1 number, n2 number) return number as
language java name 'GCD_LCM.calcGCD(int[]) return int';
or
(n0 myNumberList) return number as
language java name 'GCD_LCM.calcGCD(int[]) return int';
where myNumberList is table type.
It doesn't work.
Do you know any other method to compute GCD i sql or pl/sql?
Regards,
Marcin, Oracle817EE Received on Fri Sep 26 2003 - 07:06:04 CDT