Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select a group from a group
"edgar" <edgarpop_at_yahoo.com> a écrit dans le 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
select l.locationid
from locationproperty l, articleproperty a
where l.propertyid = a.propertyid
and a.articleid = <your article id>
/
-- Have a nice day MichelReceived on Mon Sep 24 2001 - 09:30:05 CDT
![]() |
![]() |