oracle object type / table

From: <nowong_at_my-deja.com>
Date: Tue, 19 Sep 2000 20:24:10 GMT
Message-ID: <8q8i0g$e5c$1_at_nnrp1.deja.com>


Please let me know if anybody has tried this before or is this possible at all.

I created a java file "testjava" and loaded it into the database using loadjava.
I created an object type as follow:

     CREATE TYPE TestJava AS OBJECT
        attribute1...
        attribute2...
     MEMBER FUNCTION testjava RETURN NUMBER
        AS LANGUAGE JAVA
        NAME 'testjava.testjava() return java.lang.integer';

I then created an object tables to hold objects of this type:

     CREATE TABLE test OF testjava AS
        SELECT testjava(attribute1...) FROM database_test

All of the above have created successfully. Now my question is can I call testjava() like this:

SQL> Select testjava() from test

??

I have been trying to make this work for a while. I don't even know if it is possible because the oracle documentation never gave a concrete answer. Please help.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Sep 19 2000 - 22:24:10 CEST

Original text of this message