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 -> Nested tables problem

Nested tables problem

From: Andreas Jung <ajung_at_saarland.sz-sb.de>
Date: 2000/06/19
Message-ID: <8ilofm$4st9i$1@hades.rz.uni-sb.de>#1/1

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='....'

Is this possible ?

Merci,
Andreas Received on Mon Jun 19 2000 - 00:00:00 CDT

Original text of this message

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