Duplicates

  • Thread starter Thread starter John
  • Start date Start date
J

John

I am trying to write a query that pulls information from 3
different tables. The query looks like this:

SELECT [Results].[EmpID], [Results].[COURNUM], [Results].
[Score], [Results].[CompDATE], [Results].[NumDAYS],
[Results].[SECNUM], [Results].[EmpNAME], [Results].[Link],
[Course].[Instructor]
FROM (Training INNER JOIN Results ON [Training].[COURNUM]=
[Results].[COURNUM]) INNER JOIN Course ON [Course].
[COURNUM]=[Results].[COURNUM]
WHERE [Please Select Course Numer]=[Results].[COURNUM] AND
[Please Enter Section Number]=[Results].[SECNUM];

When I run the query i get duplicate entries. Is there
something I am doing wrong, or perhaps something I can
implement to catch the duplicates? I want the query to be
based off of results....THANK A MILLION IN ADVANCE
 
Hi John, are they duplicates?

From the From clause I can sumise:
1) there are three tables Training, Results and Course
2) Training.CourNum and Results.CourNum are probably not primary keys, and
hence not appropriate, by themselves, for join between Training and Results
table

Hope this helps, Graeme
 
Back
Top