Duplicates

From: Eric (anonymous_at_discussions.microsoft.com)
Date: 04/08/04


Date: Thu, 8 Apr 2004 11:30:45 -0700

I am running a query that will return results from 4
different tables and the code looks something like this

SELECT Course.COURNUM, Profile.EmpID, Profile.EmpNAME,
Profile.EmpMGR, Profile.EmpSTRDATE, Course.StrDATE,
Course.CompDATE, Course.Instructor, Course.ResTYPE,
Training.TraiNAME, Training.Method, Results.Score,
Results.NumDAYS

FROM (Training INNER JOIN Course ON Training.COURNUM =
Course.COURNUM) INNER JOIN (Profile INNER JOIN Results ON
Profile.EmpID = Results.EmpID) ON Training.COURNUM =
Results.COURNUM

WHERE ((([Enter Course Number])=[Results].[COURNUM]) AND
(([Enter section Number])=[Results].[SECNUM]));

Basically the structure is that the course table contains
information about courses (course number, section, times,
instructors) results(employee name, the course taken,
which section and scores) profile (has employee info) and
training (which is the course specific information, name
of course and things like that.

With all that being said, the problem i am having is that
when i run the above query to return all results for
employees who have taken that class, I get a list of the
results, but it duplicates the entire line of information
pastes it into the next row and changes the section number
to another offered section. So if Emp. 1 took Course 1
Section 1, and Course 1 has sections 1 & 2, the query will
return the results for Emp. 1 Section 1 Course 1 correctly
then also puts an extra line with the same results but is
Emp 1 Section 2 Course 1. Any ideas on what i am doing
wrong? Thanks a lot...sorry for being so wordy..



Relevant Pages

  • Duplicates
    ... I am running a query that will return results from 4 ... FROM (Training INNER JOIN Course ON Training.COURNUM = ... Course.COURNUM) INNER JOIN (Profile INNER JOIN Results ON ... So if Emp. ...
    (microsoft.public.access.forms)
  • Re: correlated subquery in the crosstab
    ... FROM (tblStudent INNER JOIN (tblClass INNER JOIN ... values from the outer query and I have made an alias for it. ... I have students, courses, exam groups containing exams of courses, ... that the crosstab query in access has much more capablities than ...
    (microsoft.public.access.queries)
  • Re: correlated subquery in the crosstab
    ... I solved my problem using stored queries to act as subqueries. ... FROM (tblStudent INNER JOIN (tblClass INNER JOIN ... values from the outer query and I have made an alias for it. ... that the crosstab query in access has much more capablities than ...
    (microsoft.public.access.queries)
  • Re: correlated subquery in the crosstab
    ... The first query ... TRANSFORM FirstAS FirstOfscore ... FROM tblStudent INNER JOIN (((tblEduYear INNER JOIN tblExamGrp ON ... that the crosstab query in access has much more capablities than ...
    (microsoft.public.access.queries)
  • Re: Return just the first record that fits the parameter
    ... Be warned that coordinate subqueries are slow since they run the query one time for each record in the main query. ... FROM tblProcess INNER JOIN ... This is the only record for Plan 06-22. ... It would be convenient to be able to use "ABC 10" as the criteria for ProcName, and return all Plans that include that Process. ...
    (microsoft.public.access.queries)