Results 1 to 3 of 3
  1. #1
    dakpluto is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2012
    Posts
    18

    Delete duplicates from both tables

    I have two tables. I need to find the duplicates between both tables (easy part, already done) The hard part, I then need to remove the records from BOTH Tables. For the life of me I can't figure out how to do this. Deleting from one table is fairly simple, but I can't figure out how to delete from the second table also.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    DELETE sql action can work for only one table at a time. Problem is as soon as you delete from one table you find query will no loner work and can't delete from second tabe.

    Suggest you write the found records to a temp table then run DELETE sql for each of the tables based on records of the temp table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    dakpluto is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2012
    Posts
    18
    Quote Originally Posted by June7 View Post
    DELETE sql action can work for only one table at a time. Problem is as soon as you delete from one table you find query will no loner work and can't delete from second tabe.

    Suggest you write the found records to a temp table then run DELETE sql for each of the tables based on records of the temp table.
    oh yeah, didn't even think to just move them to a new table. Thanks! That should work perfectly. Sigh, brain was just too fried to think of the simple task, lol

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

Similar Threads

  1. auto delete duplicates
    By sammiantha in forum Access
    Replies: 2
    Last Post: 04-17-2012, 02:37 AM
  2. Replies: 2
    Last Post: 03-30-2012, 10:50 AM
  3. Relationship - Three Tables - No Duplicates
    By Huddle in forum Database Design
    Replies: 15
    Last Post: 07-27-2010, 07:45 AM
  4. Delete duplicates within one table
    By zbreima in forum Access
    Replies: 1
    Last Post: 01-28-2010, 06:49 PM
  5. Could not delete from specified tables.
    By bullwinkle55423 in forum Queries
    Replies: 0
    Last Post: 08-31-2006, 08:14 AM

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