Results 1 to 4 of 4
  1. #1
    nikana is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Posts
    3

    Listing Duplicates from mutiple Tables

    I'm assembling a list of amateur athlete performances from various competitions.



    • Data for each competition is assembled in separate tables, which includes multiple fields for their performance.
    • The athlete ID is two fields; 'First_Name' and 'Last_Name'.
    • The performance data also has consistent field names; eg. 'achievement', 'Body_Weight', 'Club'.


    Functionally, I'd like to have a query that will assemble all the athletes names, and list all the competitions they participated in. Then I'd like a separate query assembling each athlete's achievements / performances from the competitions they participated in. The constant for this is the athlete's ID.

    My SQL skills are quite limited.
    Any direction will be greatly appreciated.

    I'm using:
    Windows Version: Windows 10
    Access Version: Access 2016

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Names make very poor unique identifiers.

    Each competition is in its own table? Should be one table for competitions with another field for competitionID. Otherwise, use a UNION query to combine the multiple competition tables into the single dataset should be to begin with.
    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
    nikana is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2015
    Posts
    3
    Thank you June7, I will explore a UNION query. I'm also not sure I know how to combine the first and last name identifiers when searching other tables, but will see if I can figure it out.

    I considered combining all competitions into one table but I'm going back decades and it would become quite cumbersome.

    The data I am importing has the names already established, and there will be hundreds (maybe thousands?) by the end. What would you recommend instead of names for identifiers?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    In conventional structure, would have a table Athletes where each record is unique and autonumber field could generate unique PK. The AthleteID would be saved as FK in the Competitions table. However, since you are importing data, this may not be simple. If your import does not have any unique identifier other than the names, then there is no other connection to Athletes table. Pray you don't have multiple athletes named John Smith.

    What's cumbersome is the non-optimized data structure you are working with. Why would correcting structure be more cumbersome than having to resort to UNION query? Once you have the data UNIONed, use it to create combined table.
    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. Replies: 6
    Last Post: 06-20-2017, 08:56 AM
  2. Quering Three tables causes duplicates
    By BatmanMR287 in forum Access
    Replies: 10
    Last Post: 01-07-2015, 07:15 PM
  3. Forms using mutiple tables
    By cantord in forum Forms
    Replies: 11
    Last Post: 10-26-2012, 08:58 AM
  4. Relationship - Three Tables - No Duplicates
    By Huddle in forum Database Design
    Replies: 15
    Last Post: 07-27-2010, 07:45 AM
  5. Searching mutiple tables
    By mbolster in forum Access
    Replies: 8
    Last Post: 07-06-2010, 10:16 AM

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