Results 1 to 6 of 6
  1. #1
    vom is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    3

    Writing query to find duplicates across tables

    Hi,

    I am new to Microsoft Access and writing queries. I was wondering if anyone could offer some suggestions.



    Employees submit information into a form which translates the information into a table. The table has been in use for years. By accident some employees were writing to an archived table while others were writing the the active table. This resulted in a field called "WorkID" being duplicated across the two tables.

    Bottom line I am trying to write a query finding duplicates across tables but basing the duplicate only on certain columns.

    Can anyone offer any assistance?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    Google: Access query find duplicates.
    Does this help: http://www.ehow.com/how_13574_wizard-create-find.html
    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
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    How can some be writing to one table, and others be writing to another?
    Seems there is/are some untested forms/queries being used in a production system.

    This seems to be an issue with testing/maintenance and production activities, or a situation where multiple developers have independent access to database for the purpose of making changes.

    Looks like some Standard Procedures are needed.

    Finding the duplicates is a small piece of the puzzle. Understanding why duplicates or multiple forms are being used is another, preventing it in future is another and getting some "business practices in place" is yet another.

    Good luck.

  4. #4
    vom is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    3
    Quote Originally Posted by orange View Post
    How can some be writing to one table, and others be writing to another?
    Seems there is/are some untested forms/queries being used in a production system.

    This seems to be an issue with testing/maintenance and production activities, or a situation where multiple developers have independent access to database for the purpose of making changes.

    Looks like some Standard Procedures are needed.

    Finding the duplicates is a small piece of the puzzle. Understanding why duplicates or multiple forms are being used is another, preventing it in future is another and getting some "business practices in place" is yet another.

    Good luck.
    I am not responsible for creating web forms that link to the database. I was brought in temporarily to help with other objectives. This falls outside of my objective but I decided to help establish a solution because it is the right thing to do and wouldn't take that long. I agree there may be deficiencies, but not all situations have corporate level IT staffing for implementation the way they should be in a perfect world. I am not defending what I agree is an error, but saying that I understand why it occurred. My only concern in the matter in my current scope was helping to resolve the issue at hand.

    I was able to assist in working through this issue in Access without writing any RAW SQL queries. Thank you for the replies.

  5. #5
    vom is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    3
    Quote Originally Posted by June7 View Post
    Google: Access query find duplicates.
    Does this help: http://www.ehow.com/how_13574_wizard-create-find.html
    Only relevant for data in a single table. There is no default query for comparing duplicate data across tables. You have to query the two tables together and then run the default duplicate query in Access from what I can see. Just FYI. But thank you for the link.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    Sorry, I should have looked more closely at that link.

    What you want is the opposite of Find Unmatched. And yes that does require joining tables in query on common value, in your case the WorkID. An INNER JOIN will return only the records where WorkID is in both tables.
    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.

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

Similar Threads

  1. Need Help with writing Query for TWO TABLES
    By taimysho0 in forum Programming
    Replies: 4
    Last Post: 01-18-2012, 07:26 PM
  2. Find Duplicates Query - Excluding Items
    By Wahnsinn in forum Queries
    Replies: 1
    Last Post: 11-17-2011, 07:27 AM
  3. Find duplicates query to populate input form
    By kctalent in forum Queries
    Replies: 6
    Last Post: 08-22-2011, 03:12 PM
  4. Replies: 6
    Last Post: 02-10-2011, 07:09 AM
  5. Find Duplicates Query
    By mulefeathers in forum Queries
    Replies: 13
    Last Post: 04-22-2010, 05:39 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