Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:05:32+00:00 2026-06-05T22:05:32+00:00

I’ve come here for help with a complicated query. I’ve tried a lot of

  • 0

I’ve come here for help with a complicated query. I’ve tried a lot of different things for this and not quite got the results that I want. A watered down version of my schema is as follows: The three tables in question are an Employees Table, an EmployeeTraining Table, and a RequiredTraining table. The employees table holds information of an employee, such as empID,name, address, email, positionWorked, etc etc. The EmployeeTraining table holds an empID, and TrainingName.The RequiredTraining table has a Position and TrainingName.

Employees: empID,
Name,
Position

EmployeeTraining: empID,
trainingName

requiredTraining: Position,
trainingName

Here’s some sample data, just to further clarify:

Employees

              *EMPID~~Name~~Position~~
                  1      Ted     Accountant

                  2      Bob     Janitor

employeeTraining

                 **empID~~TrainingName**
                    1          Crunching Numbers

                    1          Microsoft Excel

                    1          Using an Abicus

                    2          Lemon Pledge 100

                    2          Scrubbing Toilets

requiredTraining

                  **position**~~**TrainingName**


                    Accountant    Crunching Numbers

                    Accountant    Microsoft Excel

                    Accountant    Using an Abicus

                    Accountant    TPS Reports

                    Janitor       Lemon Pledge 100

                    Janitor       Scrubbing Toilets

In english, and in the long run, I want to select an employee from a form and have a subform showing all of the training completed from that employee(SELECT * FROM Employees INNER JOIn EmployeeTraining on employees.empid = employeetraining.empID WHERE empID = me.empID)

I also want another subform that shows the training that an employee has NOT completed that is required for their current position. This is where I am struggling. I am not familiar or comfortable with using MS Access’s query builder, but I have tried “find unmatched” queries as well as trying to write my own. This seems like a MINUS operation would work, but MS Access doesn’t support MINUS. I have tried a LEFT JOIN with a null predicate as well as a NOT IN from the above query to a query of the requiredTraining table, but I haven’t got the results I’m looking for.

For example, the result of the query I’m trying to write for this sample data would be:

for employeeID 1 (Ted the Accountant)

ted needs “TPS Reports” training

for employee 2 ( Bob the Janitor)

Bob has completed all of his training for his position.

An example of an attempted query I am trying is:

      SELECT employees.position,employeeTraining.empid,employeetraining.TrainingName          
      FROM EmployeeTraining 
      InNER JOIN Employees ON EmployeeTraining.empid = employees.empid
      WHERE empid = '1'
      LEFT JOIN
      SELECT TrainingName,Position FROM requiredTraining
      ON EmployeeTraining.Training = RequiredTraining.Training
      WHERE (((EmployeeTraining.Training is Null)))

Edit: This question has been answered. Thanks everyone for the help. Your queries, although each was different, all accomplished the goal.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:05:33+00:00Added an answer on June 5, 2026 at 10:05 pm

    The query below is created from two MS Access queries with the SQL cut and pasted into derived tables. The two queries select the employee with their current training (#1) and the employee with their required training (#2). It is not updateable, but is easy to create. You can show only the missing training by adding a line at the end:

    WHERE et.TrainingName Is Null
    

    To select a single employee, you can add a line:

    WHERE rt.EMPID=1 AND et.TrainingName Is Null
    

    However, you mention a subform, so I expect you will wish to use link child and master fields to limit by employee.

    SQL

    SELECT rt.empid,
           rt.position,
           rt.trainingname,
           et.trainingname AS IsTrained
    FROM   (SELECT employees.empid,
                   requiredtraining.position,
                   requiredtraining.trainingname
            FROM   employees
                   INNER JOIN requiredtraining
                           ON employees.position = requiredtraining.position) AS rt
           LEFT JOIN (SELECT employees.empid,
                             employees.position,
                             employeetraining.trainingname
                      FROM   employees
                             INNER JOIN employeetraining
                                     ON employees.empid = employeetraining.empid) AS
                     et
                  ON ( rt.trainingname = et.trainingname )
                     AND ( rt.position = et.position )
                     AND ( rt.empid = et.empid ); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.