FAQ Database Discussion Community


Checking for duplicates with ResultSet.getString

java,sql,jsp,resultset,duplicate-data
May I know the best way to validate a variable by checking if there are any duplicates in my database? I've tried several different ways already, but whenever the first if condition is not fulfilled, a blank page would be shown Edit: I've thought about setting username to a unique...

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

r,duplicates,duplicate-data
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 "c","c","c", "d", "d", "d", "d")...

How to duplicate a structure into a pointer with malloc function [C-Programming]

c,malloc,duplicate-data
I've tried to create a function that duplicate a structure into a pointer, but here is the issue, there is a char tab into the structure and I can't assign my original value to the new structure. The function : Planete *dupliquer(Planete *p){ Planete *res; res = (Planete*) malloc(sizeof(Planete)); if(res...

Duplicate results from mysql

php,mysql,duplicate-data,invoices,webshop
I'm new to php, but I have already made some query's for my webshop. I have a little problem now with making the invoice. I'm trying put the invoice data from the database in a table in my website, but it duplicates itself. Product_id | Product name | amount |...

Preventive measures for duplicate entries VBA Excel

excel,vba,excel-vba,duplicate-data,duplicate-entry
I have a UserForm that adds new items to my inventory sheet. I would like to seek help on if I could make my product like a primary key. So that the "product key" cannot be duplicated. Any help will be deeply appreciated. My code is as follows in the...

Exclude subsequent duplicated rows

r,conditional,duplicate-data
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 0.06 Prb6 0.01 Prb7 0.10 Prb8 0.05" df <- read.table(text=df,...

How to create a SQL select that creates all data for a range and counts occurences

mysql,sql,select,duplicate-data
I want to take data in one table that has records recording when events took place on certain dates and create output that has data for the complete date range with the number of events per person per date counted. For example if I have a Source table containing data...

a maximum value per rowname(1, 2, or A, B..) per multiple columns in R

r,max,duplicate-data
I want to a maximum value per rowname(1, 2, or A, B..) per multiple columns(samples). I have a matrix. id sample1 sample2 sample3 ... 1 16498 2416 12555.5 1 21282.5 3342 22202 2 18558 2308 na 2 17966 3047 na 2 398 176.5 na 3 347 227 201.5 3 604.5...

Error message for data duplication in asp.net

c#,asp.net,duplicate-data
I have tried this below code, but it throws a unique key constraint error. I would like it as a pop-up message; see my below code. using (SqlConnection con2 = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString)) { var fromdate = DateTime.Parse(txtfromdate.Text); var todate = DateTime.Parse(txttodate.Text); var datedif1 = (todate - fromdate).Days; var sqlInsert =...