A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Remove dublecate post



 
 
Thread Tools Display Modes
  #1  
Old March 15th, 2010, 02:09 AM posted to microsoft.public.access.queries
Highlight between 3 fields[_2_]
external usenet poster
 
Posts: 26
Default Remove dublecate post

Hello

I have Table with two columns "Eng" and "Arb"
I found that contain dublecate posts with same information.
Is it possible to keep only one post that use unique and delete other post
that is dublecate?

I mean how can you make code that looks like:
If Eng and Arb = next post Eng and Arb Then
remove one of these
then check next post until it be only one unique
post then continue to take next post and repeat the first if again.

Is there any idea to solve this?
  #2  
Old March 15th, 2010, 06:30 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Remove dublecate post

On Sun, 14 Mar 2010 19:09:01 -0700, Highlight between 3 fields
wrote:

Hello

I have Table with two columns "Eng" and "Arb"
I found that contain dublecate posts with same information.
Is it possible to keep only one post that use unique and delete other post
that is dublecate?

I mean how can you make code that looks like:
If Eng and Arb = next post Eng and Arb Then
remove one of these
then check next post until it be only one unique
post then continue to take next post and repeat the first if again.

Is there any idea to solve this?


Probably the simplest way is to create a new table by copying and pasting this
table, design view only.

Open the Indexes tool and create a new unique index. Click the icon (lightning
bolt hitting a datasheet) and put some distinctive name - e.g. idxEngArb - in
the left column; Eng in the right column next to it; Arb in the next row down
of the right column. Check the "Unique" checkbox.

Then run an Append query appending all the fields from your current table into
this new table. You'll get a warning message that "213 records were not added
due to key violations" - that's the duplicates.

Check that you have all the data you want, delete the old table, rename the
new one, compact and repair, and you should be in business.

--

John W. Vinson [MVP]
  #3  
Old March 15th, 2010, 08:09 AM posted to microsoft.public.access.queries
Highlight between 3 fields[_2_]
external usenet poster
 
Posts: 26
Default Remove dublecate post

Hello

Thank you for replay, but it is not that I am asking.
Here is example:
Eng Arb
Anna Anders
Mona Anders
Anna Anders
Lisa Larsson
Lisa Jacopsson

[Eng] [Arb]
So in this table I want just delete "Anna Anders" and keep only one post of
Anna Anders.

Because I want the idea looks like
IF [Eng] and [Arb] next post [Eng] and [Arb] Then
Keep this post
Else
remove one of these post

And loop to compare all table of [Eng] and [Arb]

Thank you a lot
  #4  
Old March 15th, 2010, 01:39 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Remove dublecate post

Well doing what John Vinson said SHOULD do what you are requesting.

Did you try it?

IF you don't want to PERMANENTLY delete the duplicate, then you can use a
query to display the information and show only one record of the duplicate.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Highlight between 3 fields wrote:
Hello

Thank you for replay, but it is not that I am asking.
Here is example:
Eng Arb
Anna Anders
Mona Anders
Anna Anders
Lisa Larsson
Lisa Jacopsson

[Eng] [Arb]
So in this table I want just delete "Anna Anders" and keep only one post of
Anna Anders.

Because I want the idea looks like
IF [Eng] and [Arb] next post [Eng] and [Arb] Then
Keep this post
Else
remove one of these post

And loop to compare all table of [Eng] and [Arb]

Thank you a lot

  #5  
Old March 15th, 2010, 05:24 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Remove dublecate post

On Mon, 15 Mar 2010 01:09:01 -0700, Highlight between 3 fields
wrote:

Thank you for replay, but it is not that I am asking.
Here is example:
Eng Arb
Anna Anders
Mona Anders
Anna Anders
Lisa Larsson
Lisa Jacopsson

[Eng] [Arb]
So in this table I want just delete "Anna Anders" and keep only one post of
Anna Anders.


That is EXACTLY WHAT MY SUGGESTION WILL DO.

Try it.
--

John W. Vinson [MVP]
  #6  
Old March 16th, 2010, 12:05 AM posted to microsoft.public.access.queries
Highlight between 3 fields[_2_]
external usenet poster
 
Posts: 26
Default Remove dublecate post

Thank you very much for help
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.