Results 1 to 2 of 2
  1. #1
    dollygg is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    73

    Delete records with Key NOT found in another table


    I am using MS access table . Any example on this?

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    So you have two tables,
    tbl1 tbl 2
    1 ---- 1
    2 ---- 3
    3 ---- 4
    4 ---- 5

    and you want to delete the record for "3" in your first table? If so, you would outer join the two tables, i believe that would be a left join from 1 to 2. then
    DELETE *
    FROM tblname
    WHERE tbl2.fieldname Is Null.
    obviously thats pseudo-code but you get the picture.

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

Similar Threads

  1. Number of Records Found by a Query?
    By Xiaoding in forum Queries
    Replies: 3
    Last Post: 03-05-2010, 03:34 PM
  2. Return 0 if no records found
    By skwilliamson in forum Programming
    Replies: 1
    Last Post: 12-01-2009, 10:54 AM
  3. Delete duplicate records
    By Zukster in forum Queries
    Replies: 1
    Last Post: 08-26-2009, 03:14 AM
  4. #delete records
    By supernova122 in forum Access
    Replies: 0
    Last Post: 07-08-2009, 08:41 AM
  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