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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
Remove dublecate post
Thank you very much for help
|
Thread Tools | |
Display Modes | |
|
|