Questions tagged [duplicate-data]

358 questions
332
votes
18 answers

How to remove duplicate values from a multi-dimensional array in PHP

How can I remove duplicate values from a multi-dimensional array in PHP? Example array: Array ( [0] => Array ( [0] => abc [1] => def ) [1] => Array ( [0] => ghi [1] => jkl ) [2] => Array …
Ian
  • 10,744
  • 26
  • 58
  • 75
289
votes
13 answers

How do I find duplicate values in a table in Oracle?

What's the simplest SQL statement that will return the duplicate values for a given column and the count of their occurrences in an Oracle database table? For example: I have a JOBS table with the column JOB_NUMBER. How can I find out if I have any…
Andrew
  • 12,513
  • 15
  • 53
  • 82
179
votes
26 answers

How to remove duplicate values from an array in PHP

How can I remove duplicate values from an array in PHP?
Ian
  • 10,744
  • 26
  • 58
  • 75
129
votes
22 answers

Xcode duplicate/delete line

Coming from Eclipse and having been used to duplicate lines all the time, it's pretty strange finding out that Xcode has no such function. Or does it? I know it's possible to change the system wide keybindings but that's not what I'm after.
Summer
  • 1,484
  • 2
  • 10
  • 10
49
votes
4 answers

Techniques for finding near duplicate records

I'm attempting to clean up a database that, over the years, had acquired many duplicate records, with slightly different names. For example, in the companies table, there are names like "Some Company Limited" and "SOME COMPANY LTD!". My plan was to…
Richie Cotton
  • 107,354
  • 40
  • 225
  • 343
43
votes
11 answers

Best way to remove duplicate entries from a data table

What is the best way to remove duplicate entries from a Data Table?
Ananth
  • 9,360
  • 22
  • 79
  • 108
34
votes
17 answers

How to count duplicates in Ruby Arrays

How do you count duplicates in a ruby array? For example, if my array had three a's, how could I count that
user100051
26
votes
12 answers

If I stop a long running query, does it rollback?

A query that is used to loop through 17 millions records to remove duplicates has been running now for about 16 hours and I wanted to know if the query is stopped right now if it will finalize the delete statements or if it has been deleting while…
RyanKeeter
  • 5,589
  • 7
  • 30
  • 39
23
votes
11 answers

what are the fast algorithms to find duplicate elements in a collection and group them?

Say you have a collection of elements, how can you pick out those with duplicates and put them into each group with least amount of comparison? preferably in C++, but algorithm is more important than the language. For Example given…
t.g.
  • 1,639
  • 2
  • 14
  • 25
16
votes
5 answers

Case insensitive duplicates SQL

So I have a users table where the user.username has many duplicates like: username and Username and useRnAme john and John and jOhn That was a bug and these three records should have been only one. I'm trying to come up with a SQL query that lists…
hdx
  • 3,358
  • 6
  • 22
  • 32
16
votes
6 answers

How to remove the quoted text from an email and only show the new text

I am parsing emails. When I see a reply to an email, I would like to remove the quoted text so that I can append the text to the previous email (even if its a reply). Typically, you'll see this: 1st email (start of conversation) This is the first…
Tim
  • 1,877
  • 4
  • 16
  • 20
15
votes
6 answers

Vim duplicate selection

If i have something selected in VIM in visual mode .... how can i duplicate that selection and place it below or above the selection.
Gabriel Solomon
  • 26,777
  • 15
  • 55
  • 76
15
votes
11 answers

How to detect duplicate data?

I have got a simple contacts database but I'm having problems with users entering in duplicate data. I have implemented a simple data comparison but unfortunately the duplicated data that is being entered is not exactly the same. For example, names…
grom
  • 14,812
  • 18
  • 60
  • 65
15
votes
6 answers

Exclude subsequent duplicated rows

I would like to exclude all duplicated rows. However, it has to be true just when they are subsequent rows. Follows a representative example: My input df: df <- "NAME VALUE Prb1 0.05 Prb2 0.05 Prb3 0.05 Prb4 0.06 Prb5 …
user2120870
  • 889
  • 4
  • 14
14
votes
6 answers

Removing contiguous duplicate lines in vi without sorting

This question already addresses how to remove duplicate lines, but enforces that the list is sorted first. I would like to perform the remove contiguous duplicate lines step (i.e. uniq) without first sorting them. Example…
davetapley
  • 14,759
  • 11
  • 54
  • 74
1
2 3
23 24