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

Finding duplicates

2006-10-30 Thread Chris W
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 where this con

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
updated. - Original Message - From: "Jerry Schwartz" <[EMAIL PROTECTED]> To: Sent: Thursday, October 12, 2006 1:42 PM Subject: Finding duplicates It seems to me I ought to be able to construct a query, probably using sub-SELECTs), that would do what I want. I have a ta

Finding duplicates

2006-10-12 Thread Jerry Schwartz
It seems to me I ought to be able to construct a query, probably using sub-SELECTs), that would do what I want. I have a table that looks roughly like this: CREATE TABLE prod (prod_num INTEGER UNIQUE, prod_title VARCHAR(255), updated DATE) UNIQUE PRIMARY KEY (prod_num); In this table there migh

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

Finding duplicates, etc.

2006-05-01 Thread Dirk Bremer
I have the following table: *Column Information For - production.group15034_I*/ FieldType Collation NullKey Default Extra Privileges Comment --- ---

RE: SQL question: Finding duplicates

2004-02-03 Thread Russell Horn
> > row | foo > 1 | a > 2 | c > 3 | b > 4 | c > 5 | a > 6 | d > > the statement would return me rows 1, 2, 4, and 5. > CREATE TEMPORARY TABLE temptable SELECT * FROM test GROUP BY foo HAVING COUNT( * ) >1 ORDER BY foo ASC ; SELECT * FROM test, temptable WHERE test.foo = temptable.f

SQL question: Finding duplicates

2004-02-03 Thread Simon Detheridge
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Disclaimer: I'm not an SQL expert so please don't laugh. ;-) I'm trying to generate a way to find all rows from a table where the data in column 'foo' is a duplicate of the data in another row. I.E.: row | foo 1 | a 2 | c 3 | b 4 | c 5 |

Re: Bug in finding Duplicates with Group By?

2003-09-18 Thread Paul DuBois
At 4:56 PM -0500 9/18/03, Allen wrote: DISTINCT key_field is fine. I don't think it will make a difference. My example was using only one field. Your example was using three fields by my count. DISTINCT field1 is likely to yield a different result than DISTINCT field1, field2, field3. What form

Re: Bug in finding Duplicates with Group By?

2003-09-18 Thread Allen
DISTINCT key_field is fine. I don't think it will make a difference. My example was using only one field. Paul DuBois wrote: At 4:22 PM -0500 9/18/03, Allen wrote: Ok. I looked through google and saw a couple examples of how to find the duplicates in a table that looked like this... SELECT

Re: Bug in finding Duplicates with Group By?

2003-09-18 Thread Paul DuBois
At 4:22 PM -0500 9/18/03, Allen wrote: Ok. I looked through google and saw a couple examples of how to find the duplicates in a table that looked like this... SELECT date, time, id, count(*) as n from session GROUP BY date,time,id HAVING n > 1; Ok. So I tried it. I have a table of 13,128,178 r

Bug in finding Duplicates with Group By?

2003-09-18 Thread Allen
Ok. I looked through google and saw a couple examples of how to find the duplicates in a table that looked like this... SELECT date, time, id, count(*) as n from session GROUP BY date,time,id HAVING n > 1; Ok. So I tried it. I have a table of 13,128,178 rows (not a small example). I ran a DIST

SV: Finding Duplicates and Deleting

2001-02-09 Thread Jacob Kamp Hansen
ind of bad example, but you should get the idea) Then delete records from the table where found is more than one. /Jacob -Oprindelig meddelelse- Fra: Linsen Limsico [mailto:[EMAIL PROTECTED]] Sendt: 8. februar 2001 18:13 Til: mysql_list Emne: Finding Duplicates and Deleting Does anyone know h

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
To: mysql_list <[EMAIL PROTECTED]> Sent: Thursday, February 08, 2001 8:13 PM Subject: Finding Duplicates and Deleting Does anyone know how to find duplicates in a table and deleting them. I can't figure out how to structure the query. Linsen ---

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

Finding Duplicates and Deleteing

2001-02-08 Thread 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

Finding Duplicates and Deleting

2001-02-08 Thread 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