Solved

Access 2003 Table Duplicate Records Removal

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

Title # Comments Views Activity
Help With Database JOIN 7 30
Need help on t-sql 2012 10 57
Merge two rows in SQL 4 25
Pivot tables in SQL 1 20
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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