Chand [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 11:27 AM
To: Jeff McKeon; [EMAIL PROTECTED]
Subject: RE: Deleting duplicating records
Well that is OK if I have only one email.
What if if I have thousands of users duplicated...
Do I need to write SQL query 1000 times
Karam
--- Jeff
Engineering
Test Data Management Group
6824-1367
Karam Chand <[EMAIL PROTECTED]>29/07/2003 01:13 AM
To: Venelin Arnaoudov <[EMAIL PROTECTED]>, [EMAIL PROTECTED],
[EMAIL PROTECTED]
cc: [EMAIL PROTECTED], (bcc: BORNAY Richard/Engr/STATS/ST Group)
Subject: Re: Deleting duplica
Try this:
Delete your_table t
Where t.version > min(t.version)
Group by t.email
Lin
-Original Message-
From: Karam Chand [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 11:27 AM
To: Jeff McKeon; [EMAIL PROTECTED]
Subject: RE: Deleting duplicat
There a bit of discussion like this in the user comments of the manual:
http://www.mysql.com/doc/en/example-Maximum-row.html
- Andy
Venelin Arnaoudov wrote:
>
> I would copy all the records (_email_, max(version)) to a new table,
> drop the old one and then rename the new one
>
> Regards,
> Ven
Great.
So in that case I need to create a new table with
similar structure with a additional UNIQUE index on
email.
Karam
--- Venelin Arnaoudov <[EMAIL PROTECTED]> wrote:
> I would copy all the records (_email_, max(version))
> to a new table,
> drop the old one and then rename the new one
>
>
I would copy all the records (_email_, max(version)) to a new table,
drop the old one and then rename the new one
Regards,
Venelin
Karam Chand wrote:
Well that is OK if I have only one email.
What if if I have thousands of users duplicated...
Do I need to write SQL query 1000 times
Karam
Well that is OK if I have only one email.
What if if I have thousands of users duplicated...
Do I need to write SQL query 1000 times
Karam
--- Jeff McKeon <[EMAIL PROTECTED]> wrote:
> How bout
>
> Delete from tablename where email like
> [EMAIL PROTECTED] && ID <> 1
>
> Jeff
> > -O
How bout
Delete from tablename where email like [EMAIL PROTECTED] && ID <> 1
Jeff
> -Original Message-
> From: Karam Chand [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 28, 2003 10:33 AM
> To: [EMAIL PROTECTED]
> Subject: Deleting duplicating records
>
>
> Greetings
>
> I manage