Results 1 to 6 of 6
  1. #1
    boomkrekel is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    3

    Question combine two tables

    Hello,

    I think I have a very simple question, but I cannot find the solution myself..

    I have two tables with sightings of bird species.
    Table 1 and Table 2.

    Table 1: my species;
    Table 2: John's species.

    Table 1 has the following fields: Id, species, number;
    Tabel 2 only has two fields: species, number.

    The relation between the two tables is "species".
    Some records are the same, some differ.

    I want one table with the following five fields:
    Id, species (from table 1), number (1), species (from table 2), number (2).

    If I use a QUERY for this, the result is a table with only species that are in both tables.
    What I want is a table with ALL species, also the ones that are only in table 1 AND the ones that are in table 2.

    I sounds so very basic, however, I cannot find out how to do it...

    Can someone help me?



    Thanks!

  2. #2
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    I would add,(Append) all the records from tbl2 into tbl1 then delete Table2.

  3. #3
    boomkrekel is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    3
    Thanks for your reply,

    Quote Originally Posted by Rainlover View Post
    I would add,(Append) all the records from tbl2 into tbl1 then delete Table2.
    But then the result is a table with doubles in the "species" field.
    I want a table without doubles and without missing values.

    Cheers

  4. #4
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    In Query Design View.

    Add both tables.

    Next add to the grid the fields from tbl2 that you wish to append plus Species from tbl1.

    The Join should be for All Records from tbl2 and omly those records from tbl1 that match.

    In your criteria for Species in tbl1 put Is Null.

    This should append the records as you described.

    I don't know what to do about missing information. If it is not there there is nothing that can be done except to manually add it.

    BACK UP before doing this.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I suspect what you want is called a FULL OUTER JOIN, which unfortunately is not supported in Access (at least not in previous versions). The workaround in Access is to create 3 queries and UNION them together. The 3 would join your existing tables 3 different ways, with LEFT, RIGHT and INNER joins.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    boomkrekel is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    3
    Thanks everybody for your help!
    I guess it is not as basic as I thought it would be.

    I found a thread which describes what I want:

    https://www.accessforums.net/access/...uch-18486.html

    Thanks again.

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

Similar Threads

  1. Replies: 4
    Last Post: 10-28-2011, 12:49 PM
  2. Combine data from 3 different tables
    By udigold1 in forum Queries
    Replies: 3
    Last Post: 06-29-2011, 12:18 AM
  3. Combine two unrelated tables with the same fields
    By lghovden06 in forum Queries
    Replies: 4
    Last Post: 07-27-2010, 03:36 PM
  4. I have 4 Tables in Access - can I combine them?
    By officespace in forum Access
    Replies: 6
    Last Post: 02-22-2009, 07:21 AM
  5. combine three tables in a query
    By neuenglander in forum Queries
    Replies: 0
    Last Post: 08-21-2008, 04:02 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