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 -> selecting from nested tables

selecting from nested tables

From: Amos Elberg <realhome_at_ct1.nai.net>
Date: 1997/11/20
Message-ID: <652i96$hcf@a3bsrv.nai.net>#1/1

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

Original text of this message

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