Results 1 to 5 of 5
  1. #1
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146

    Combining Fields from multiple Tables


    I would like to combine Fields from different tables into a "Master" Listing. What would the query look like? Just one field from each table that are identical. For instance, Serial Numbers field from different Model Tables so that there is a combined Master listing of all Serial Numbers. Thanks.

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,929
    What would the query look like?
    depends what the tables look like.

    Either it will be a select query where each table is linked to another on a suitable unique value field or you would use a union query where each table contains the same type of information.

    I suspect the latter, so something like

    SELECT SerialNo FROM tbl1
    UNION SELECT SerialNo FROM tbl2
    UNION SELECT SerialNo FROM tbl3
    etc

    this can only be written in the sql window

    Your question implies you are either bringing data together from multiple sources into a normalised system or you have an unnormalized database. If the latter, this is something you will need to address as it will become harder and harder to manage over time.

  3. #3
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146
    The Union query worked great. Thanks so much! How do I name the field that is created in this Master list?

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,929
    How do I name the field that is created in this Master list?
    it will take the name of the first select e.g.

    SELECT SerialNo AS MasterSerialNo FROM tbl1
    UNION SELECT SerialNo FROM tbl2


  5. #5
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146
    Ok. I noticed that, I just didn’t know if there was a way to rename it to something more appropriate. Thanks

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

Similar Threads

  1. Combining Multiple Tables
    By knowshowrosegrows in forum Queries
    Replies: 4
    Last Post: 09-24-2015, 01:05 PM
  2. Replies: 14
    Last Post: 07-22-2013, 12:39 PM
  3. combining multiple tables in to one master
    By joebox8 in forum Queries
    Replies: 5
    Last Post: 06-23-2011, 06:18 AM
  4. Combining multiple tables
    By Duncan in forum Access
    Replies: 1
    Last Post: 03-27-2011, 08:41 AM
  5. Replies: 1
    Last Post: 06-03-2006, 05: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