RE: Deleting duplicating records

2003-07-29 Thread Lin Yu
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

Re: Deleting duplicating records

2003-07-28 Thread richardb
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

RE: Deleting duplicating records

2003-07-28 Thread Lin Yu
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

Re: Deleting duplicating records

2003-07-28 Thread Andy Jackman
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

Re: Deleting duplicating records

2003-07-28 Thread Karam Chand
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 > >

Re: Deleting duplicating records

2003-07-28 Thread Venelin Arnaoudov
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

RE: Deleting duplicating records

2003-07-28 Thread Karam Chand
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

RE: Deleting duplicating records

2003-07-28 Thread Jeff McKeon
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