Solved

Access 2003 Table Duplicate Records Removal

Posted on 2014-01-14
5
211 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

'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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

778 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