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
wakula
Messages: 150
Registered: February 2008
Location: Poland
Senior Member
Hi,

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 
TABLE OF INTEGER INDEX BY INTEGER, 
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
ramoradba
Messages: 2454
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
akagno3
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: Sun Sep 25 04:25:02 CDT 2016

Total time taken to generate the page: 0.13423 seconds