[AccessD] Basic Query Design

Steve Erbach erbachs at gmail.com
Thu Feb 9 09:35:51 CST 2006


Stuart,

Hah!  The guy that came up with it is a professor in the Computer
Science Dept. at UW-Parkside in Kenosha, WI...right in my neck of the
woods.  After showing this method and explaining how it's derived in
detail, he wrote, "Imagine presenting this to undergrads who have just
a lecture or two of SQL under their belts.  You DO get the chance to
talk about scoping of aliases..."

Steve Erbach
Scientific Marketing
Neenah, WI
http://TheTownCrank.blogspot.com


On 2/8/06, Stuart McLachlan <stuart at lexacorp.com.pg> wrote:
> 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
>



More information about the AccessD mailing list