Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2017
    Posts
    5
    Provided Answers: 1

    Unanswered: Merging tables without adding new records

    Hi all,
    A little help please. I'm new to Access and I must be missing something because I end up with duplicate records.
    In Access I have two tables (1 and 2), and the task is to insert tbl_2 into tbl_1.
    • No new records should be created in tbl_1.
    • tbl_1 and tbl_2 have a common field.
    • The number of fields in both tables are known and will not change.
    • tble_1 has fields that tbl_2 does not have.
    • tbl_2 has some fields that tbl_1 does not have. These should be ignored.
    • Creating a new tbl_3 instead of directly replacing tbl_1 is acceptable.

    Example
    The matching field in “b”
    Table 1:
    key a b c
    --- ----------- ---------- -------
    k0 hello dear world
    k1 bye cruel world
    k2 welcome outta world
    k3 turulu
    k4 welcome outta
    k5 turulu dear

    Table 2:
    key b d
    --- ------- -------
    K0 dear john
    K1 cruel ann

    Table 3 (the new tbl_1):
    key a b c d
    --- ----------- ------- ------- -------
    k0 hello dear world john
    k1 bye cruel world ann
    k2 welcome outta world
    k3 turulu
    k4 welcome outta
    k5 turulu dear john


    Any help would be greatly appreciated.Click image for larger version. 

Name:	tables.jpg 
Views:	3 
Size:	24.1 KB 
ID:	17308
    Last edited by PHILnTEX; 03-13-17 at 20:25.

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,476
    Provided Answers: 11
    Check how you are Joining the Tables and how you are Grouping them
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •