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

Home -> Community -> Mailing Lists -> Oracle-L -> Nested tables problem

Nested tables problem

From: Andreas Jung <ajung_at_sz-sb.de>
Date: Mon, 19 Jun 2000 20:28:15 +0200
Message-Id: <10533.109743@fatcity.com>


I tried the following creation statement to create a nested table:

drop type t_originalcpv force;
drop type originalcpvList force;

create or replace type t_originalcpv as object (

        code char(8)
);
/

create or replace type originalcpvList as table of t_originalcpv;
/

/

create table tab_main(

	docnum         number(10,0),
	originalcpv    originalcpvList,
	constraint main_pk primary key (docnum)
) 
	nested table originalcpv store as originalcpvTab
	tablespace main
	storage(initial 10M next 10M pctincrease 10)
;

create index main_originalcpv_idx

        on ojs_main(originalcpv.code) tablespace main;

The creation of the index failed with ORA-00904: invalid column name - although I followed the Oracle documentation. Where is the problem ?

Another question with nested table: I want to select one or more rows from the table above by the value of the "code" column in the nested table...something like that:

 select docnum from tab_main where originalcpv.code='....' Received on Mon Jun 19 2000 - 13:28:15 CDT

Original text of this message

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