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

Home -> Community -> Usenet -> c.d.o.misc -> Re: select a group from a group

Re: select a group from a group

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Mon, 24 Sep 2001 15:35:09 +0100
Message-ID: <3baf44a3$0$227$ed9e5944@reading.news.pipex.net>


Take a look at the outer join syntax from the sql reference "edgar" <edgarpop_at_yahoo.com> wrote in message news:a135a6b.0109240607.267c879e_at_posting.google.com...
> Hi,
> I need your help in solving this problem:
>
> we have the following tables:
> property(propertyID(number), propertyName(number))
> articleProperty(articleID(number), propertyID(number))
> locationProperty(locationID(number), propertyID(number))
> as U may guess in last tables propertyID refences propertyID in first
> table.
>
> having one articleID, find all locations that have at least the same
> properties as that article. (at least means locations _must_ have
> articles's prop but can have other props also)
>
> my best guess is:
> select distinct l.locationid from locationproperty l where
> (select propertyid from articleproperty where articleid=1) in
> (select propertyid from locationproperty where
> locationid=l.locationid)
>
> of course this dose not work.
>
> thanks
Received on Mon Sep 24 2001 - 09:35:09 CDT

Original text of this message

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