Questions tagged [duplicate-data]

358 questions
10
votes
2 answers

Insert ... on duplicate key update nothing using MySQL

My problem is that I have multiple unique keys on a table. Insert ignore is not an option because it suppresses the errors. MySQL has no support for any type of conditionals outside a statement (ex. if (cond) then insert else don't insert) Stored…
Tudor
  • 1,033
  • 1
  • 11
  • 26
9
votes
2 answers

Combine two data frames and remove duplicate columns

I want to cbind two data frames and remove duplicated columns. For example: df1 <- data.frame(var1=c('a','b','c'), var2=c(1,2,3)) df2 <- data.frame(var1=c('a','b','c'), var3=c(2,4,6)) cbind(df1,df2) #this creates a data frame in which column var1…
danilinares
  • 1,002
  • 1
  • 8
  • 22
9
votes
3 answers

Duplicating a record in Rails 3

I have a prescription model in my Rails 3 application. I am trying to work out the best method of allowing records to be duplicated, but allowing the user to "review" the duplicate before it's saved. I have read a number of questions/answers on SO…
dannymcc
  • 3,544
  • 11
  • 50
  • 84
7
votes
2 answers

SQL: Removing Duplicate records - Albeit different kind

Consider the following table: TAB6 A B C ---------- ---------- - 1 2 A 2 1 A 2 3 C 3 4 D I consider, the records {1,2, A} and {2, 1, A} as duplicate. I need…
G P
  • 73
  • 4
7
votes
4 answers

Why is preg_match_all returning two matches?

I am trying to identify if a string has any words between double quotes using preg_match_all, however it's duplicating results and the first result has two sets of double quotes either side, where as the string being searched only has the one…
Styphon
  • 9,859
  • 8
  • 51
  • 82
7
votes
3 answers

How can I find indices of each row of a matrix which has a duplicate in matlab?

I want to find the indices all the rows of a matrix which have duplicates. For example A = [1 2 3 4 1 2 3 4 2 3 4 5 1 2 3 4 6 5 4 3] The vector to be returned would be [1,2,4] A lot of similar questions suggest using the unique…
Matt Harris
  • 3,326
  • 5
  • 29
  • 43
6
votes
1 answer

Entity Framework Query Results Duplicate

I created a SQL View that joins a few tables and when tested in SQL Manager it provides the correct data (If a makes a difference these are complex joins). In MVC I created a (data first) Entity Data Model and then added code generation. I have a…
6
votes
5 answers

How can I compare two tables and delete the duplicate rows in SQL?

I have two tables and I need to remove rows from the first table if an exact copy of a row exists in the second table. Does anyone have an example of how I would go about doing this in MSSQL server?
zSynopsis
  • 4,776
  • 21
  • 64
  • 101
6
votes
7 answers

How to prevent repeated postbacks from confusing my business layer

I have a web application (ASP.Net 3.5) with a conventional 3 layer design. If the user clicks a button a postback happens, some middle and data layer code runs, and the screen is refreshed. If the user clicks the button multiple times before the…
Sisiutl
  • 4,745
  • 8
  • 37
  • 54
6
votes
4 answers

Suppress the duplicate values in group, SSRS Reports

I have an SSRS report where the date should be grouped by project category the project code in the category is repeating in side the group how do I suppress the value Please help me to get an idea. Thanks,brijit
brijit
6
votes
2 answers

Multiple duplicates (2 times, 3 times,...) in R

After searching for a while, I know that this question has not been answered yet. Assume that I have the following vector v <- c("a", "b", "b", "c","c","c", "d", "d", "d", "d") How do I find those values having more than 1 duplicates (should be…
Duy Bui
  • 1,085
  • 5
  • 14
  • 27
6
votes
1 answer

Insert unique value using Clustered ColumnStore Index

I would like to know how I would go about of creating my table or choosing an insert that make sure that I do not get duplicate values. create table test.dbo.test product, time, primary key(product, time) go When using Clustered ColumnStore I can…
eleijonmarck
  • 3,374
  • 4
  • 18
  • 24
6
votes
3 answers

How to remove duplicate comma separated value in a single column in MySQL

SELECT id, country FROM my_records I've got the above result from MySQL query and i want to remove duplicate ID from the result. Not with the help of PHP code but do with MySQL query. Is there any function or query to do the same. Thanks
Jassi Oberoi
  • 1,414
  • 1
  • 12
  • 25
6
votes
2 answers

SQL find duplicate records occuring within 1 minute of each other

I am checking website entrys that are recorded in a database columns: browser, click_type_id, referrer, and datetime if multiple rows have the same browser, click_type_id, and referrer and are timestamped (occur within 1 minute of one another) they…
JD.
  • 61
  • 1
  • 2
6
votes
2 answers

MySQL duplicating all data at C:\ProgramData\MySQL and C:\Users\All Users\MySQL?

Running out of storage space on disk (machine running win7 SP1 x64), was looking into what files were taking up the most space, noticed that MySQL is storing same data at the following 2 locations: C:\ProgramData\MySQL C:\Users\All Users\MySQL All…
Sebastian
  • 63
  • 4
1
2
3
23 24