Stuart McLachlan
stuart at lexacorp.com.pg
Sun Apr 24 18:39:01 CDT 2005
On 24 Apr 2005 at 19:00, Susan Harkins wrote: > Yes > > SELECT Species.SpecID > FROM Species > WHERE > NOT EXISTS > (SELECT CBCData.CountID From CBCData WHERE CBCData.CountID <> 57) > ORDER BY Species.SpecID > ... > Using this syntamx, there's no relationship between the two SELECT > statements. > I've tried adding a join to the mix -- in the sub and the main -- but > haven't been successful yet. That's because you aren't selecting SpecID from CBCData, your're selecting CountID. Try something like (aircode) SELECT Species.SpecID FROM Species WHERE SpecID NOT IN (SELECT DISTINCT CBCData.SpecID From CBCData Where CBCData.CountID = 57) -- Stuart