Re: SQL to combine required and completed training courses.
- From: zac.carey@xxxxxxxxx
- Date: 24 Jul 2006 09:57:19 -0700
rkc wrote:
Considering the following tables is it possible to
write an SQL query that would result in rows that look like
(EmpID, CourseID, DateTaken) for each employee and each
required course in one result set?
1 4 8/12/2005
1 5 8/12/2005
1 6 NULL
2 6 7/7/2006
2 4 NULL
Employees(EmpID*, PosID)
Positions(PosID*)
Courses(CourseID*)
RequiredCourses(CourseID*, PosID*)
CompletedCourses(EmpID*, CourseID*, DateTaken*)
Just thinking out loud...
what does this give you?
SELECT cc.EmpID,cc.CourseID,cc.DateTaken
FROM CompletedCourses cc, Employees e, RequiredCourses rc
WHERE cc.EmpID = e.EmpID
AND cc.CourseID = rc.CourseID
AND rc.PosID = e.PosID
ORDER BY cc.EmpID,cc.DateTaken;
.
- Follow-Ups:
- Re: SQL to combine required and completed training courses.
- From: zac . carey
- Re: SQL to combine required and completed training courses.
- From: zac . carey
- Re: SQL to combine required and completed training courses.
- References:
- Prev by Date: SQL to combine required and completed training courses.
- Next by Date: Re: SQL to combine required and completed training courses.
- Previous by thread: SQL to combine required and completed training courses.
- Next by thread: Re: SQL to combine required and completed training courses.
- Index(es):
Relevant Pages
|