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
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):
&
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
> -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
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
--
"
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
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
14 matches
Mail list logo