Jürgen Welz
jwelz at hotmail.com
Fri Feb 10 13:06:05 CST 2006
Thanks Steve/Stuart I'll run some performance testing this weekend on my original method and the two alternate solutions. I'll post results Monday. Ciao Jürgen Welz Edmonton, Alberta jwelz at hotmail.com >From: Jim Lawrence <accessd at shaw.ca> > >One note: Would this query allow the user to go for coffee while waiting >for >the results? 'Sub queries' and 'not exists' has certain reputations? > >Jim > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan >Sent: February 8, 2006 7:04 PM >To: Access Developers discussion and problem solving >Subject: Re: [AccessD] Basic Query Design > >On 8 Feb 2006 at 20:36, Steve Erbach wrote: > > > SELECT DISTINCT EmployeeID > > FROM tblEmployeeCourse AS EC1 > > WHERE NOT EXISTS > > ( SELECT CourseID FROM tblCourse > > WHERE CourseID In (1,2,4,5) AND NOT EXISTS > > ( SELECT * FROM tblEmployeeCourse AS EC2 > > WHERE EC2.CourseID = tblCourse.CourseID > > AND EC2.EmployeeID = EC1.EmployeeID)) > > > >Ouch! My head hurts! > >-- >Stuart