Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> selecting from nested tables
I have a table that looks something like this: create table myTable (
pk NUMBER(38,0) PRIMARY KEY,
... values irrelevant for this question...
feature feature_table
);
where feature_table is:
create type feature_table as table of NUMBER(3,0);
Now what I'd like to do is get a count of entries in myTable which contain a particular value in their nested table feature. I've looked my darndest through the Oracle8 documentation, and haven't found a thing to help with this; the closest way I can define it is as a correlated subquery on a nested table. This is the best I've been able to do: select count(*)
from myTable t, THE (SELECT t2.feature
from myTable t2) f
where f = <search value>;
this returns "column does not exist". It also doesn't look right; it doesn't
appear to be correlated properly.
Can anyone help, or at least point me toward proper documentation on
nested tables?
Thanks,
-Amos
Received on Thu Nov 20 1997 - 00:00:00 CST
![]() |
![]() |