Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    41

    Unanswered: Append adding duplicate records

    I have an append query that for the life of my I can not figure out why it is appending duplicate records.

    Here is a sample SQL

    INSERT INTO DetMed7 ( [Header ID], DetMedCmts )
    SELECT [Copy Old Plan to New Plan - DetMedsix].Expr1, DetMed7.DetMedCmts
    FROM DetMed7 INNER JOIN [Copy Old Plan to New Plan - DetMedsix] ON DetMed7.[Header ID] = [Copy Old Plan to New Plan - DetMedsix].[Header ID];


    Any help would be appreciated.

    Thanks,
    Jeff

  2. #2
    Join Date
    Nov 2002
    Posts
    272
    Make sure all tables are empty, and it won't happen again.

    Seriously; we can't tell you anything from the information you've given.
    Tell us the table definitions and show us an example of the data that doesn't behave like you want it to (before and after).

  3. #3
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    I don't know the answer either, but I betcha that if you had a primary key defined in DetMed7 that it wouldn't happen again. DON'T use autonumber; use a field or combination of fields to define as your primary key.

    HTH,

    Sam

Posting Permissions

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