Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select a group from a group
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