Results 1 to 2 of 2
  1. #1
    jcrice88 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2018
    Posts
    3

    Combine tables with different number of rows and columns

    So I have multiple tables that I want to combine into one. They all have at least one thing in common but otherwise have different # of columns and different rows.

    I would like to have a query that combines all the tables into one and doesn't duplicate data as it is now. I have been reading abut union queries and is that the best solution?

    Here is an example of what I am wanting

    Table A
    x x z
    1 j 654
    2 r 789

    Table B


    x y 1a 2$ &^
    1 r 546 767 771
    2 j 999 789 772
    3 c 778 779 773

    Table C
    x y %
    1 r test

    Combined- what I want
    x y z 1a %
    1 r 654 564 test
    2 j 789 999 0
    3 c 0 778 0

    thanks in advance

  2. #2
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    Thinking a UNION query is your only option. Well, there's a bit of a problem from what I see in what you want as an output. You want rows but from several tables. Never tried that but SELECT DISTINCT might work.

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

Similar Threads

  1. Replies: 3
    Last Post: 10-24-2017, 05:16 PM
  2. Combine tables, many rows to one box
    By djay1991 in forum Queries
    Replies: 9
    Last Post: 04-18-2016, 09:35 AM
  3. Replies: 6
    Last Post: 02-14-2015, 05:40 PM
  4. Replies: 5
    Last Post: 08-22-2014, 05:01 AM
  5. Linking columns to ID number in multiple tables
    By oakeoffice in forum Access
    Replies: 8
    Last Post: 11-08-2012, 07:10 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