Home » SQL & PL/SQL » SQL & PL/SQL » Type defined inside a type ? (Oracle 10.2G)
Type defined inside a type ? [message #440258] Thu, 21 January 2010 17:22 Go to next message
Messages: 150
Registered: February 2008
Location: Poland
Senior Member

I have encountered interesting problem today.
I wanted to create an user defined analytic function. For that purpose I need a user type/object.
Inside the implementation I wanted to have a "table of integer index by pls_integer" or a varray so that implementation parts can access those data. Now the tricky part: How to define that inside the type?
One possible solution is to create a type on the schema level.
But can the type be defined inside my type?
What I have tried (and failed due to syntax check):
CREATE OR REPLACE TYPE fancy_name_here
AS OBJECT (TYPE typeTableOfIntIndexByInt IS 
fancy_collection typeTableOfIntIndexByInt, 
<methods go here)

This seems obvious that I cannot define type in that way cause I am defining members inside the type...
Any ideas? Thanks in advance.

[Updated on: Fri, 22 January 2010 00:54] by Moderator

Report message to a moderator

Re: Type defined inside a type ? [message #440263 is a reply to message #440258] Thu, 21 January 2010 22:19 Go to previous messageGo to next message
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
i think,Its not possible to define a type inside a type.

But you can create the subtype under type Using "NOTFINAL" and "UNDER" clauses.(but that is individually
AM also waiting for other members response if any possible solution.

sriram Smile
Re: Type defined inside a type ? [message #440306 is a reply to message #440258] Fri, 22 January 2010 05:20 Go to previous message
Messages: 2
Registered: January 2010
Location: New Delhi
Junior Member

u can't do like this
Previous Topic: How to call a member procedure in a subtype/subclass (object relational oracle)
Next Topic: Procedure type definition
Goto Forum:

Current Time: Thu Aug 17 08:56:55 CDT 2017

Total time taken to generate the page: 0.19018 seconds