Results 1 to 4 of 4
  1. #1
    spidge32 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2021
    Posts
    58

    Unmatched Records Query

    I have 2 tables

    Table 1. Table 2.
    JobCode JobCode
    JobLine JobLine
    JobDescription JobDescription

    Table 1 is the child record from another database. These records can have new JobLine records added to any of the JobCodes. I need to find these records and then append these new records to Table 2 as table 2 is the child table in my access database.

    Unmatched records query does not allow me to look for records which are in Table 1 and not in table 2 as it needs to match JobCode and JobLine which are missing.

    Thanking you in advance.

    Bill

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Well, that's exactly what FindUnmatched query is for - to find records in one table that don't have a match in other. Did you even try to build query? The wizard will walk you through.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Apr 2017
    Posts
    1,673
    Code:
    INSERT INTO Table2 (JobCode, JobLine, JobDescription)
    SELECT t1.JobCode, t1.JobLine, t1.JobDescription
    FROM Table1 t1
    LEFT JOIN Table2 t2 ON t2.JobCode = t1.JobCode AND t2.JobLine = t1.JobLine
    WHERE t2.JobLine Is Null

  4. #4
    spidge32 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2021
    Posts
    58
    Quote Originally Posted by June7 View Post
    Well, that's exactly what FindUnmatched query is for - to find records in one table that don't have a match in other. Did you even try to build query? The wizard will walk you through.
    Hi,
    Yes I did try a query with the wizard, I solved the problem by importing the unique sequence no and used the findunmatched query. It didn't work initially as I needed to find the unmatched on 2 fields.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Unmatched records on a specific date
    By gambesq in forum Queries
    Replies: 6
    Last Post: 02-18-2019, 11:04 AM
  2. Replies: 14
    Last Post: 07-31-2018, 11:00 AM
  3. Query and unmatched records
    By jlgray0127 in forum Forms
    Replies: 1
    Last Post: 03-19-2012, 05:56 PM
  4. Help! Unmatched Records Query
    By Hberg in forum Access
    Replies: 1
    Last Post: 03-09-2012, 03:41 PM
  5. Replies: 1
    Last Post: 12-08-2011, 01:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums