Union Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking to join all tables (that have all employees training
information) so that I can do a report of all the training activities of each
employee.

I tried the suggestion to do a query of all training of all employees, and
that did not work because what is some tables is not in other tables and
therefore pulled up bogus data.

So there in lies the problem, i believe that I need a union query.

Ok, here it goes...

I have tables
[Drill information] with fields...date, DrillID, Senario Number, Score,
drill Type, Instructor
Individual Drill Performance Data with fields...PERNR, Name, DrillID,
IndividualScore
Exam Archive File with fields...PERNR, Name, SSN, Test Type, Examdate,
Grade, Passed, Job Code, Test type, Inactive, Active, Pass Rate
Prex Given with fields...PERNR, Name, SSN, Prex #, Prex level, Prex type,
Date, Score, Record #, Job title, Pass/Fail, Supervisor Obs, Supervisor Obs
Sat, Supervisor Name
Student/Exam info with fields...PERNR, Name, SSN, Dept, Exam #, Exam Date,
Grade, Supervisor Y/N, Pass/Fail, Exam Type
Target Training with fields...PERN, Name, MM Current Date Enrolled, MM 1 st
Enrollment, MM 2nd Enrollment, MM 3rd Enrollment, Mini Mockups, Drill Current
Date Enrollment, Drill 1st Enrollment, Drill 2nd Enrollment, Drill 4th
Enrollment, Drill 4th Enrollment, Drill Reason.
 
Not the answer that you want to hear, but I believe that your database is
designed wrong. You shouldn't have different types of training in different
tables. Rather you should have a table of Employees; another of Courses; and
a third table called something like Attendance that links an Employee to a
Course and stores information such as Pass/Fail. There are probably other
tables needed to especially with fields named like MM 1st Enrollment, MM 2nd
Enrollment, MM 3rd Enrollment.

Things like Pass Rate probably shouldn't be stored at all; rather as derived
data, it should be computed as needed.

You MIGHT be able to get a Union query to work by carefully padding the
fields and aligning up things. However the first time anyone adds or
subtracts fields in any table, it will break.
 
Back
Top