Results 1 to 6 of 6
  1. #1
    Ricks41at is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2018
    Posts
    4

    I suddenly got Stupid - Combining tables with queries?


    I have 2 tables, One with 250 records with Birthdates, the other with 2000 records with Hire dates, otherwise the table are nearly the same (Name, ID#, Depts. etc) How do I combine the 2 tables so I have all the information in one with those records that have birthdates show up in the table with records that have hiredates? And NOT loose any Birthdate people who are not in the Hire date table?

    I used to know this back in Access 5

    Rick

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Are you sure there was an Access 5? I thought it went from Access 2.0 to Access 7.0 (97)

    Use the table with 2000 records as your new main table and add a BirthDate field
    a) use an update query joining both tables with an inner join on ID field to get records in both tables
    b) use an append query joining both tables with an outer join to add new records not in Hire table

    NOTE: it is possible to do both in one 'UPEND' query (update with outer join) but probably safer to do in two steps

    Once you've combined them and checked the data is OK, delete the other table as data should not be duplicated

    Recommend you replace ID# with ID as 'special characters' should not be used in field names
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #3
    Ricks41at is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2018
    Posts
    4
    I don't want to loose the original tables. And I'm not sure I understand "inner join" and "outer join"

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

  5. #5
    Ricks41at is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2018
    Posts
    4
    And where is this "setting" in Access? How do I choose these Joins? And Besides, my tables are square, not roound ??!? :-)

  6. #6
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Quote Originally Posted by Ricks41at View Post
    And where is this "setting" in Access? How do I choose these Joins? And Besides, my tables are square, not roound ??!? :-)
    LOL
    That's where you're going wrong. Access tables should be long and thin!
    The screenshots in this post may be helpful https://www.access-programmers.co.uk...56&postcount=4

    However if you don't want to delete the original table after meeting, don't do the merge.
    Just use SELECT queries to combine data from the two tables
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

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

Similar Threads

  1. Replies: 8
    Last Post: 01-27-2018, 06:59 AM
  2. Replies: 6
    Last Post: 07-09-2015, 06:40 PM
  3. combining 2 queries
    By sdel_nevo in forum Queries
    Replies: 2
    Last Post: 07-23-2014, 04:41 AM
  4. Replies: 2
    Last Post: 09-14-2012, 03:49 PM
  5. Replies: 1
    Last Post: 06-21-2007, 01: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