Results 1 to 4 of 4
  1. #1
    AlexTheGr8 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2019
    Location
    Ontario
    Posts
    11

    Question Append Query keeps duplicating records

    Hi All,



    I have UpdateTable which holds provider names, the year they signed on, and their unique IDs (but not a primary key) that I want to append to an existing table (OperationalReviews). There are about 700 records.

    When I write the append query it ends up appending 2100 records instead. Essentially each row is repeated three times and I'm not sure why. I've pasted the SQL below. Is there any way to make it so that the table appends as is and doesn't repeat itself?

    INSERT INTO OperationalReviews ( ProviderID, Provider, OpReviewYear )
    SELECT UpdateTable.F1, UpdateTable.F2, UpdateTable.F3
    FROM UpdateTable, OperationalReviews;

    Any feedback is welcome!

    Thanks,
    AlexTheGr8

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The lack of join creates a Cartesian product, and you don't use the second table anyway. Try

    INSERT INTO OperationalReviews ( ProviderID, Provider, OpReviewYear )
    SELECT UpdateTable.F1, UpdateTable.F2, UpdateTable.F3
    FROM UpdateTable
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    AlexTheGr8 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2019
    Location
    Ontario
    Posts
    11
    This solved my issue - thank you so much!

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Append query duplicating records
    By thart21 in forum SharePoint
    Replies: 2
    Last Post: 11-08-2017, 12:16 PM
  2. Replies: 19
    Last Post: 10-03-2017, 09:10 AM
  3. Access can't append all the records in the append query
    By fluffyvampirekitten in forum Access
    Replies: 2
    Last Post: 08-27-2015, 01:53 AM
  4. Replies: 4
    Last Post: 07-24-2015, 07:03 AM
  5. duplicating records
    By kstyles in forum Queries
    Replies: 7
    Last Post: 12-31-2010, 02:31 PM

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