Walter,
I tested this and it returns no records. I assumed it was due the EXIST select statement which refers to the p.key but the p is not identified as data source in the select. When I added species as data source, it returns a huge file (2 million records). I'm expecting 28 records.
Ken
Hi Ken,
>
>How about,
>
>
>SELECT genus, species, continent ;
> FROM Species P INNER JOIN Site S ON P.Pkey = S.fkey ;
> WHERE S.continent IN ('Africa','Asia') AND ;
> EXISTS (SELECT * FROM Site WHERE fKey = P.Key AND Continent = 'Asia') AND ;
> EXISTS (SELECT * FROM Site WHERE fKey = P.Key AND Continent = 'Africa') ;
> ORDER BY 1,2
>
>Walter,