May 12, 2005 #1 din2005 Programmer Mar 22, 2005 162 GB Hi all i have 2 tables, i can make a query which displays records that match each other. In table 1 there are 136 records in table 2 there are 5000. but in table 2 i would to delete the 136 records that match table 1. any criteria do i need to put?
Hi all i have 2 tables, i can make a query which displays records that match each other. In table 1 there are 136 records in table 2 there are 5000. but in table 2 i would to delete the 136 records that match table 1. any criteria do i need to put?
May 12, 2005 #2 citychap26 Programmer Sep 19, 2004 144 GB Hi Din Check out my thread http://www.tek-tips.com/viewthread.cfm?qid=1059239&page=1 Cheers SK Upvote 0 Downvote
May 12, 2005 #3 PHV MIS Nov 8, 2002 53,708 FR DELETE Table2.* FROM Table2 INNER JOIN Table1 ON your join condition here Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
DELETE Table2.* FROM Table2 INNER JOIN Table1 ON your join condition here Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
May 13, 2005 #4 citychap26 Programmer Sep 19, 2004 144 GB Hi PHV, I tried this approach and it did not work. Cheers SK Upvote 0 Downvote
May 13, 2005 #5 JonFer Programmer Nov 7, 2003 868 US What fields are you joining on? Are these fields indexed? John http://www.interautomateconsulting.com Upvote 0 Downvote
What fields are you joining on? Are these fields indexed? John http://www.interautomateconsulting.com