Re: Finding duplicates

2006-10-30 Thread Chris
Chris W wrote: Chris wrote: Chris W wrote: Suppose I have table t with fields k1, k2 and k3 that all make up the primary key. Then I have fields x, y and z. If fields x, y and z all have the same values in more than one row, there is a good chance they are duplicate records. What is the be

Re: Finding duplicates

2006-10-30 Thread Chris W
Chris wrote: Chris W wrote: Suppose I have table t with fields k1, k2 and k3 that all make up the primary key. Then I have fields x, y and z. If fields x, y and z all have the same values in more than one row, there is a good chance they are duplicate records. What is the best way to list a

Re: Finding duplicates

2006-10-30 Thread Chris
Chris W wrote: Suppose I have table t with fields k1, k2 and k3 that all make up the primary key. Then I have fields x, y and z. If fields x, y and z all have the same values in more than one row, there is a good chance they are duplicate records. What is the best way to list all of the rows

RE: Finding duplicates

2006-10-12 Thread Jerry Schwartz
gt; To: Jerry Schwartz; mysql@lists.mysql.com > Subject: Re: Finding duplicates > > You're kind of heading down the right road. And this was > discussed on the list not too long ago, how to delete duplicates. > > Here's one solution that will find the oldest duplicate(s): &

Re: Finding duplicates

2006-10-12 Thread Brent Baisley
You're kind of heading down the right road. And this was discussed on the list not too long ago, how to delete duplicates. Here's one solution that will find the oldest duplicate(s): SELECT prod.prod_num,prod.prod_title,prod.updated FROM prod JOIN ( SELECT prod_title,max(updated) maxdate FROM pr

RE: Finding duplicates, etc.

2006-05-02 Thread Dirk Bremer
> -Original Message- > From: Peter Brawley [mailto:[EMAIL PROTECTED] > Sent: Monday, May 01, 2006 16:55 > To: Dirk Bremer > Cc: mysql@lists.mysql.com > Subject: Re: Finding duplicates, etc. > > Dirk, > > >I would like to know where there ar dupli

Re: Finding duplicates, etc.

2006-05-01 Thread Peter Brawley
Dirk, I would like to know where there ar duplicate accounts that do not have duplicate addresses. I think that at this point in time that these are included in the first query. I would like to separate these out to report on them. How about ... select account,ident,address from group15034_i

Re: Finding Duplicates and Deleteing

2001-02-08 Thread Steve Ruby
select column1,column2,column3, count(*) as numlines from table group by column1,column2,column3 having numlines > 1 That will find them,, you'll have to write some script or something to go through the results and remove the duplicates, I'm not sure if a query that will do both at once. Linse

Re: Finding Duplicates and Deleting

2001-02-08 Thread Steve Ruby
"Carsten H. Pedersen" wrote: > > > Does anyone know how to find duplicates in a table and deleting > > them. I can't figure out how to structure the query. > > > > Linsen > > http://www.bitbybit.dk/mysqlfaq/faq.html#ch7_6_0 > > / Carsten > -- > Carsten H. Pedersen > keeper and maintainer of t

RE: Finding Duplicates and Deleteing

2001-02-08 Thread The Tilghman
Depending upon the function of the table, you might consider designing your table such that duplicates aren't possible (e.g. putting a UNIQUE index on a column or set of columns). Other than that, try dumping your table, removing the rows you don't want, and reloading the table. -Tilghman -- "

Re: Finding Duplicates and Deleting

2001-02-08 Thread Rus
I hope you have unique id in your table Select distinct into temp table, then select each row from temp table and delete from your_table where field="dupl value" and id<>temp.id (in abstract syntax) - Original Message - From: Linsen Limsico <[EMAIL PROTECTED]> To: mysql_list <[EMAIL PROTE

Re: Finding Duplicates and Deleteing

2001-02-08 Thread Peter Lewis
On Thu, 8 Feb 2001, Linsen Limsico wrote: > Does anyone know how to find duplicates in a table and deleting them. I can't figure >out how to structure the query. > > Linsen > Hello, Being new to this I don't know the coding however I would look at making another table and then use the UNIQUE com

Re: Finding Duplicates and Deleting

2001-02-08 Thread Anna
>- Original Message - >From: "Linsen Limsico" >Does anyone know how to find duplicates in a table and >deleting them. I can't figure out how to structure the query. >Linsen Exact duplicates or where only one field is duplicated? Anna --

RE: Finding Duplicates and Deleting

2001-02-08 Thread Carsten H. Pedersen
> Does anyone know how to find duplicates in a table and deleting > them. I can't figure out how to structure the query. > > Linsen http://www.bitbybit.dk/mysqlfaq/faq.html#ch7_6_0 / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlf