Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Nested tables problem
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