Duplicates

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
 
G

Graeme Richardson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top