tricky query question
From: Ken Huisman <khuisman_at_wnet.gov.edmonton.ab.ca>
Date: Mon, 7 Nov 1994 21:30:56 GMT
Message-ID: <khuisman.32.000E846A_at_wnet.gov.edmonton.ab.ca>
Date: Mon, 7 Nov 1994 21:30:56 GMT
Message-ID: <khuisman.32.000E846A_at_wnet.gov.edmonton.ab.ca>
I have a table with a 1:M relationship to another table.
I would like to do a query on the first table based on whether or not there
exists related rows in the second table. The closest i have come is to just
do a join and retrieve the data on the 1 side several times - but i dont want
this because i only want to retrieve each row once.
i would like something like this:
select id from table1 where id is a member of ( select table1id from table2
where blah blah blah...)
kind of a set membership kind of thing.
Is there a way to do this?
many thanks.
Ken
khuisman_at_wnet.gov.edmonton.ab.ca