Results 1 to 6 of 6
  1. #1
    nshatz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    6

    joining data imported from excel

    I have two tables which are linked to external excel sheets. One table includes employee name and client ID. the other table includes client ID and client performance data.



    I want to run a query that assigns the appropriate employee to all of their corresponding client performance data via client ID.

    Any help much appreciated.

    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    So what is the issue?

    Build query. Use query designer.
    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
    nshatz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    6
    Ah yes, the issue. Sorry, I thought you could read minds as well.

    I want to take the resource_name column from the employee table (Knox_report_PS_Director) and join that column to the client performance data table (Rory_Query). When I enter the below code, it increases the number of rows in the performance data table from 51,482 to 559,947. I want the number of rows to be the same, 51,482 just with the associated employee joined to each record.

    SELECT Rory_Query.*, Knox_report_PS_Director_Orgs.resource_name
    FROM Knox_report_PS_Director_Orgs INNER JOIN Rory_Query ON Knox_report_PS_Director_Orgs.organization_id = Rory_Query.ORGANIZATION_ID
    WHERE (([Knox_report_PS_Director_Orgs].[organization_id]=[Rory_Query].[ORGANIZATION_ID]));
    Thanks.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Don't see anything wrong with that statement.

    What is the SQL statement for Rory_Query? How many records in that query?

    If you want to provide db, follow instructions at bottom of my post. Make copy and import some data from the spreadsheets into local tables or provide dummy data in 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.

  5. #5
    nshatz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    6

    Example DB for joining data from excel

    nshatz dubious database.zip

    the SQL for Rory Query pulls performance data from a DB that does not include employee data. That comes from an external source that i do not have access to. there are 51,482 records in rory_query.


    Thanks again!

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    There were no queries in that db. There is no table Knox_report_PS_Director_Orgs.

    Employees table has 11 records for organization 100025. Rory_data has 781 records for ORGANIZATION 100025. A query that joins on the organization fields will result in 8,591 (11 x 781) records. I suspect that's why your query results are high.
    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: 4
    Last Post: 03-19-2015, 06:14 PM
  2. How To Get Alert Not All DATA were imported From Excel
    By OneToLearn in forum Import/Export Data
    Replies: 1
    Last Post: 11-16-2013, 08:52 AM
  3. Replies: 3
    Last Post: 06-14-2013, 03:08 PM
  4. Excel rows sorted when imported to Access
    By gwn in forum Import/Export Data
    Replies: 1
    Last Post: 06-15-2011, 08:34 AM
  5. Linking Access Table with already imported External Data (Excel)
    By izzarshah in forum Import/Export Data
    Replies: 1
    Last Post: 07-29-2010, 09:40 AM

Tags for this Thread

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