Results 1 to 2 of 2
  1. #1
    MitchT is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    1

    Using one table to delete records from another


    I have 2 tables: One with around 15000 records and another with almost 4000. All of the records on the small list are on the large one. I need to delete all the records from the large list that are on both lists (the smaller list is people who already bough a product so we don't wat to market to them again).

    Any help is much appreciated.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Use the query wizard and run a FIND DUPLICATES query. It dont matter what, its an example. Just make it on 1 table and view the query design.
    You want a delete query similar to this...
    In the [ID] field is a 'sub-qry' with the IN command.... in (select [id] from SrcTabl)

    Make your qry similar: delete * from tTargTbl where [id] in (select [id] from tDelList))
    Delete items from your table that are IN the field of the example table.

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

Similar Threads

  1. Replies: 2
    Last Post: 04-13-2012, 12:53 AM
  2. Replies: 5
    Last Post: 01-24-2012, 06:19 PM
  3. Replies: 2
    Last Post: 01-24-2012, 02:16 PM
  4. Replies: 1
    Last Post: 04-29-2010, 05:22 PM
  5. Delete all records in a table?
    By bob646 in forum Access
    Replies: 1
    Last Post: 05-20-2007, 11:41 PM

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