• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

Access 2003 Table Duplicate Records Removal

Hello Experts,  I have an Access 2003 table that has a field called period which contains 2 digit numbers.  I.e 25,26,27,28,29,etc...etc...  I need a SQL statement that will remove the records based on the 2 digit number.  I.e remove 25, 27, 29 etc...etc.  Can someone please help?  Thanks!
0
submarinerssbn731
Asked:
submarinerssbn731
  • 2
  • 2
2 Solutions
 
SteveCommented:
DELETE YOURTABLE.YOURFIELDNAME
FROM YOURTABLE
WHERE (((YOURTABLE.YOURFIELDNAME) In (25,27,29)));
0
 
awking00Commented:
Are you saying, for example, that you have a record with a period of 25 and other records that also contain a period of 25 and you wish to remove the duplicates (i.e. all but one record with a period of 25)?
0
 
submarinerssbn731Author Commented:
No I have two different records in the period field one is 25 and the other is 27 the rest of the data in the table is a duplicate except for the 25 and 27.  I would like to remove all of the 27 records.
0
 
SteveCommented:
DELETE YOURTABLE.YOURFIELDNAME
FROM YOURTABLE
WHERE (((YOURTABLE.YOURFIELDNAME) = 27));
0
 
submarinerssbn731Author Commented:
Great answers!  Thanks!!!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now