Solved

Access 2003 Table Duplicate Records Removal

Posted on 2014-01-14
5
210 Views
Last Modified: 2014-01-15
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
Comment
Question by:submarinerssbn731
  • 2
  • 2
5 Comments
 
LVL 7

Assisted Solution

by:Steve
Steve earned 500 total points
ID: 39780135
DELETE YOURTABLE.YOURFIELDNAME
FROM YOURTABLE
WHERE (((YOURTABLE.YOURFIELDNAME) In (25,27,29)));
0
 
LVL 32

Expert Comment

by:awking00
ID: 39780211
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
 

Author Comment

by:submarinerssbn731
ID: 39780324
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
 
LVL 7

Accepted Solution

by:
Steve earned 500 total points
ID: 39780405
DELETE YOURTABLE.YOURFIELDNAME
FROM YOURTABLE
WHERE (((YOURTABLE.YOURFIELDNAME) = 27));
0
 

Author Closing Comment

by:submarinerssbn731
ID: 39782310
Great answers!  Thanks!!!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now