If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
An Opposite Report
Hello, and thanks in advance for your help.
I have three tables in my database as follows: 1. Employee - self explanatory 2. Qualfications - a list of licences, certificates, endorsements 3. Employee/Qualification Join - to link the various types of work qualifications each employee has. From this I have created two reports that show: 1. For each employee, the qualifications they hold and the expiry dates of those qualifications 2. For each qualifictation, which employees have them. MY PROBLEM IS.... I was just asked to create a report that lists the employees that don't have a particular qualification. For example, print the list of employees that don't have a first aid certificate. I have tried various queries, but have had no luck. Any suggestions. Regards Ant |
#2
|
|||
|
|||
An Opposite Report
Time to delve into subqueries.
See the "Identifying what is NOT there" section of this article: http://allenbrowne.com/subquery-01.html#NotThere -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Ant" wrote in message ... Hello, and thanks in advance for your help. I have three tables in my database as follows: 1. Employee - self explanatory 2. Qualfications - a list of licences, certificates, endorsements 3. Employee/Qualification Join - to link the various types of work qualifications each employee has. From this I have created two reports that show: 1. For each employee, the qualifications they hold and the expiry dates of those qualifications 2. For each qualifictation, which employees have them. MY PROBLEM IS.... I was just asked to create a report that lists the employees that don't have a particular qualification. For example, print the list of employees that don't have a first aid certificate. I have tried various queries, but have had no luck. Any suggestions. Regards Ant |
#3
|
|||
|
|||
An Opposite Report
Try this --
SELECT Employee FROM (tblEmployee LEFT JOIN [Employee/Qualification] ON tblEmployee.EmpID = [Employee/Qualification].EmpID) LEFT JOIN tblQualfications ON [Employee/Qualification].QualID = tblQualfications.QualID WHERE tblQualfications.Qualfication = "First Aid" AND tblQualfications.QualID Is Null ORDER BY Employee; -- Build a little, test a little. "Ant" wrote: Hello, and thanks in advance for your help. I have three tables in my database as follows: 1. Employee - self explanatory 2. Qualfications - a list of licences, certificates, endorsements 3. Employee/Qualification Join - to link the various types of work qualifications each employee has. From this I have created two reports that show: 1. For each employee, the qualifications they hold and the expiry dates of those qualifications 2. For each qualifictation, which employees have them. MY PROBLEM IS.... I was just asked to create a report that lists the employees that don't have a particular qualification. For example, print the list of employees that don't have a first aid certificate. I have tried various queries, but have had no luck. Any suggestions. Regards Ant |
Thread Tools | |
Display Modes | |
|
|