Solved

Delete Query

Posted on 2008-10-27
1
159 Views
Last Modified: 2010-03-20
I have an Access database table (on a web server).

There are 4 identical records, I want to delete 3 & keep 1.

Is there a way to do this? If I do "DELETE Orders where......." all the where criteria are the same so it will delete ALL, which I don't want.

Of course I recognize I can save the data from 1 & then re-insert, but that's a pain.

Thanks
0
Comment
Question by:Richard Korts
1 Comment
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 22817288
you have 2 options:
* create a (temporary) primary key field, so you ARE able to distinguish the records
* copy a single distinct record into a temp table (which has the same structure as the source table), delete all the duplicates, and insert back the distinct record.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

757 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

18 Experts available now in Live!

Get 1:1 Help Now