Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2013
    Posts
    3

    combining 3 tables

    I'm an excel guy and access is killing me.

    In Access 2007 I would like to import a table from 3 different database files and combine them.



    I have been successful on importing 3 tables from 3 different db's to get 3 tables in the same db but can I combine all into one table (during or after the import)?

    The tables contain the same type of time clock info but from different locations (depending on which store the employee worked at on a given day)

    What I am ultimately trying to do is pull the data from the 3 sources so I can add them up (letting me know that John Doe worked a total of 40 hours)

    please help, I am losing my hair


    thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    If field for Location does not already exist in the tables, add it and populate it appropriately.

    Then options to combine the tables:

    1. manually copy/paste records from two tables into third

    2. run INSERT SELECT sql action that essentially does what item 1 does

    3. build a UNION query that combines the three tables and use that as the basis for a MAKE TABLE sql action
    Last edited by June7; 11-13-2013 at 01:00 PM.
    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
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    ummm my advice differs from J7 based on my interpretation of your need.....it sounds like the structure of the tables is all the same.... the first thing is that once you co-mingle them would you be able to tell for any record which store is it?....if not then the first thing you want to do is add a store ID to each and populate an ID value for every record.....

    but that aside; your first excel import made a table - which is fine....your next import you should have optioned to append the first table...and you would have been done. but its not a biggie having 3 tables now.....decide which is to be the master and write an AppendQuery that copes all the data of table 2 into table master....rinse and repeat for table 3. if AppendQuery is not familiar then bing that..... if the table structure is all the same it is quite easy.....

  4. #4
    Join Date
    Nov 2013
    Posts
    3

    wow, hope it is that easy lol

    no, i don't need to know which store. final result will just let me see combined hours for each employee throughout the day. I will redo imports to look for the append option. I will also Bing the append query. I do need the new db to be linked to the old one and update itseld.

    thanks guys




    Quote Originally Posted by NTC View Post
    ummm my advice differs from J7 based on my interpretation of your need.....it sounds like the structure of the tables is all the same.... the first thing is that once you co-mingle them would you be able to tell for any record which store is it?....if not then the first thing you want to do is add a store ID to each and populate an ID value for every record.....

    but that aside; your first excel import made a table - which is fine....your next import you should have optioned to append the first table...and you would have been done. but its not a biggie having 3 tables now.....decide which is to be the master and write an AppendQuery that copes all the data of table 2 into table master....rinse and repeat for table 3. if AppendQuery is not familiar then bing that..... if the table structure is all the same it is quite easy.....

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

Similar Threads

  1. combining 3 tables
    By revned12 in forum Access
    Replies: 1
    Last Post: 07-06-2012, 06:41 AM
  2. Combining two tables to one
    By Jerseynjphillypa in forum Queries
    Replies: 3
    Last Post: 06-22-2012, 12:06 PM
  3. combining 2 tables
    By psrs0810 in forum Access
    Replies: 11
    Last Post: 01-07-2010, 08:55 AM
  4. Combining Tables
    By king_bowzow in forum Queries
    Replies: 0
    Last Post: 08-05-2009, 10:15 AM
  5. Help combining 3 tables
    By luscioussarita in forum Queries
    Replies: 1
    Last Post: 12-14-2005, 03:22 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