Re: Query question

From: Gerald Stanley (gcstanley_at_d-s-l.pipex.comREMOVE-)
Date: 05/24/04


Date: Mon, 24 May 2004 04:34:44 -0700

Try something along the lines of
SELECT YourFirstTable.[Name], YourSecondTable.CourseName
FROM YourFirstTable, YourSecondTable
WHERE YourSecondTable.CourseCode NOT IN (SELECT CourseCode
FROM YourThirdTable WHERE YourThirdTable.[ID] =
YourFirstTable.[ID])

You will have to changeth etable and column names to suit
your database.

Hope This Helps
Gerald Stanley MCSD
>-----Original Message-----
>Hi , There,
>
>I have created Training Database. The database contain 3
>tables as following :
>1- . First table contain the employees information such
>as ID, Name, Location,..etc. 2- Second one contains the
>courses that every employee must take and it's fields are
>CourseCode and CourseName.
>3- Third table contains the courses that already the
>employees have taken , and it's fileds are CourseCode
>only .
>
> I have made relationship with Employee table and
>the courses that they already have taken by ID. And
>relationship with table 2 and 3 by CourseCode.
>
> I want to make query to give me details about
>Employee information and the of courses that he not yet
>taken to enroll him in them.
>
> Actually I tried to use Unmatched query but it
>did not give me what I need.
>
> Would you , please help me
>
>Thank you Hamoud
>
>
>
>.
>



Relevant Pages

  • Query question
    ... I have created Training Database. ... First table contain the employees information such ... courses that every employee must take and it's fields are ... Thank you Hamoud ...
    (microsoft.public.access.queries)
  • newbie stuck in a HOA
    ... I have a flatfile database that contains information about ... all the courses offered ... it is in the cancel file. ...
    (perl.beginners)
  • Re: need help with SQL query
    ... > fields when passing the student id to the ENROLL table. ... > find out which scheduled courses a particular student is NOT already ... In the case above you can skip the "inner joining" syntax, ... Use an OUTER JOIN instead of INNER JOIN... ...
    (comp.lang.java.databases)
  • Database relations
    ... I guess this is pretty elementary situation but for some reason I'm stuck. ... which would sum the grades and the amount paid for different courses so they ... Is this the optimal database disign and could I achieve everything I mention ...
    (microsoft.public.access.tablesdbdesign)
  • Re: stepping through a collection in a foreach loop
    ... You're looping through the courses for a student, ... the student to the underlying database. ... just before you start a new top-level business operation. ...
    (microsoft.public.dotnet.languages.csharp)