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
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
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
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
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):
&
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
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
> -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
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
I have the following table:
*Column Information For - production.group15034_I*/
FieldType Collation NullKey
Default Extra Privileges Comment
--- ---
>
> 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
-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 |
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
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
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
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
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
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
"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
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
--
"
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
---
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
>- 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
--
> 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
Does anyone know how to find duplicates in a table and deleting them. I can't figure
out how to structure the query.
Linsen
Does anyone know how to find duplicates in a table and deleting them. I can't figure
out how to structure the query.
Linsen
26 matches
Mail list logo