Results 1 to 10 of 10
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097

    Merge 8 tables with like fields into a single table

    Click image for larger version. 

Name:	000.jpg 
Views:	22 
Size:	101.3 KB 
ID:	47593
    How does one merge the 8 tables pictured into tblAllSheets? UNION? Some sort of multiple APPENDS?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    A UNION can merge them into a single dataset. Then if you want to, can create a table from that dataset.

    Do these tables have related child 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.

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    Do these tables have related child tables?
    No, they're all the same structure. I just need to get all the records together in a single table. I've never seen a problem quite like this and was hoping Access had some friendly way of merging the tables.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Well, do a UNION query or run 8 INSERT INTO SELECT actions to populate a table or simply copy/paste records from one table to another.

    Name is a reserved word. Advise not to use reserved words as names. Also advise not to use spaces in naming convention.
    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
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    I inherited all this junk originally as individual WorkSheets in an Excel file. I tried the copy/paste to begin with, but the paste didn't work at all. Maybe the appearance of the reserved word interfered? I'll take some time in the AM to clean up the field names and have another go with Copy/Paste. I have another collection of this junk coming later in the week, so hopefully I'll learn how to better deal with this issue before then.
    Thanks June,
    Bill

  6. #6
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    If you're going to paste from a sheet to Access table, you must use paste append, not paste. Sometimes doesn't work either.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    So, I do what, create a new table with matching fields and append paste the data sheet view of this goofy looking query? (goofy looking or not, it gets me what I need.)
    Code:
    SELECT * FROM A2 
    UNION SELECT * FROM A3 
    UNION SELECT * FROM A5 
    UNION SELECT * FROM B1
    UNION SELECT * FROM B2
    UNION SELECT * FROM B3
    UNION SELECT * FROM B4
    UNION SELECT * FROM B6;
    Learn something new every day. Paste Append worked like a champ!
    Thanks,
    Bill

  8. #8
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    Yer welcome. Mark this one as solved?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    Hummm! I thought I did and I see it marked as such.

  10. #10
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    I must have been looking at an outdated search results list!
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-22-2018, 11:05 AM
  2. Replies: 4
    Last Post: 07-27-2016, 10:44 AM
  3. Replies: 1
    Last Post: 05-21-2013, 12:02 PM
  4. 500 Tables Join as Single Table
    By Franklin in forum Access
    Replies: 2
    Last Post: 08-31-2012, 01:11 PM
  5. Replies: 3
    Last Post: 03-27-2011, 03:02 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