Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> java class wrapper

java class wrapper

From: Marcin Buchwald <velvet_at_agora.pl>
Date: Fri, 26 Sep 2003 14:06:04 +0200
Message-ID: <bl1a4a$4rq$1@pippin.warman.nask.pl>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US