delete dupl from 1 table that match table 2

  • Thread starter Thread starter CHARI
  • Start date Start date
C

CHARI

I have 2 tables joined by an acct # but diff data in the 2 other columns. I
want to delete the row of information from table A that have a matching acct
# in table b.

ie: appl acct # amount (table a) appl acct # amount
(table b)

b 1234 $1.00 b 1234
$5.00
c 111 $1.00 c 12345
$5.00
c 1001 $2.00 c 1001
$3.00

want to delete rows from table a. for accts #1234 & #1001
 
DELETE [Table A].[Acct #]
FROM [TABLE A]
WHERE [Table A].[Acct #] IN
(SELECT [Acct #] FROM [Table B])

In design view
-- Select Table A
-- Select Acct # into the field grid
-- Type IN (SELECT [Acct #] FROM [Table B]) in the criteria field
-- Select Query : Delete Query from the Menu

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top