Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002
    Posts
    3

    Question Unanswered: Eliminate Duplicate records conditionally?

    I have two tables in an Access file which came from different sources, and need to be merged and show unique records conditionally :

    Table A has one field ITEM
    Table B has two fields: ITEM and CODE#

    Every ITEM in table B has a duplicate ITEM value in table A... but Table has the additional field of CODE#

    I want to combine the two, and keep the records from table B wherever there are duplicate ITEM values e.g., I only need to keep the record with the ITEM AND the CODE#...

    Seems like this should be easy, but I am a DB novice...

    Any help appreciated...thanks

  2. #2
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    do you mean somthing like one of these
    Code:
    SELECT Table1.item, Table2.code
    FROM Table1 LEFT JOIN Table2 ON Table1.item = Table2.item;
    Code:
    UPDATE Table1 LEFT JOIN Table2 ON Table1.item = Table2.item 
    SET Table1.item = "Table3", Table2.code = "Table3";
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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