Re: removing duplicate entries

2008-08-12 Thread Brent Baisley
You should be able to do it with the select you already have, something like this: delete ACCOUNTACTION from ACCOUNTACTION join ( select ACCOUNTACTION.ID from ACCOUNTACTION where ACCOUNTACTION.ACTIONDATE like '2008-08-01 02:00%' group by ACCOUNTACTION.ACCOUNT_ID having

Re: removing duplicate entries

2008-08-11 Thread Moon's Father
); Thanks for the pointers ;-) -Original Message- From: Magnus Smith [mailto:[EMAIL PROTECTED] Sent: 07 August 2008 10:35 To: Ananda Kumar Cc: mysql@lists.mysql.com Subject: RE: removing duplicate entries Yes I can see you are correct. I tried setting up a little test case myself

RE: removing duplicate entries

2008-08-07 Thread Magnus Smith
- thanks From: Ananda Kumar [mailto:[EMAIL PROTECTED] Sent: 06 August 2008 13:51 To: Magnus Smith Cc: mysql@lists.mysql.com Subject: Re: removing duplicate entries I just did a test case here select * from amc_25; +--+ | id | +--+ |2

Re: removing duplicate entries

2008-08-07 Thread Rob Wultsch
On Thu, Aug 7, 2008 at 2:34 AM, Magnus Smith [EMAIL PROTECTED] wrote: Yes I can see you are correct. I tried setting up a little test case myself. CREATE TABLE ACCOUNTACTION ( ID INT NOT NULL PRIMARY KEY, ACTIONDATE DATETIME, ACCOUNT_ID INT NOT NULL );

RE: removing duplicate entries

2008-08-07 Thread Magnus Smith
Subject: RE: removing duplicate entries Yes I can see you are correct. I tried setting up a little test case myself. CREATE TABLE ACCOUNTACTION ( ID INT NOT NULL PRIMARY KEY, ACTIONDATE DATETIME, ACCOUNT_ID INT NOT NULL ); CREATE TABLE ACCOUNTPAYMENTACTION

removing duplicate entries

2008-08-06 Thread Magnus Smith
I have the following two tables ACCOUNTACTION +---+--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-+---+ | ID| bigint(20) | NO |

Re: removing duplicate entries

2008-08-06 Thread Ananda Kumar
I doubt the belwo sql will give you duplcates select ACCOUNTACTION.ID http://accountaction.id/ from ACCOUNTACTION where ACCOUNTACTION.ACTIONDATE like '2008-08-01 02:00%' group by ACCOUNTACTION.ACCOUNT_ID having (count(ACCOUNTACTION.ACCOUNT_ID) 1 and ACCOUNTACTION.IDhttp://accountaction.id/!=

RE: removing duplicate entries

2008-08-06 Thread Magnus Smith
Smith Cc: mysql@lists.mysql.com Subject: Re: removing duplicate entries I doubt the belwo sql will give you duplcates select ACCOUNTACTION.ID http://accountaction.id/ from ACCOUNTACTION where ACCOUNTACTION.ACTIONDATE like '2008-08-01 02:00%' group by ACCOUNTACTION.ACCOUNT_ID having (count

Re: removing duplicate entries

2008-08-06 Thread Ananda Kumar
: removing duplicate entries I doubt the belwo sql will give you duplcates select ACCOUNTACTION.ID http://accountaction.id/ from ACCOUNTACTION where ACCOUNTACTION.ACTIONDATE like '2008-08-01 02:00%' group by ACCOUNTACTION.ACCOUNT_ID having (count(ACCOUNTACTION.ACCOUNT_ID) 1

Removing duplicate entries

2002-01-03 Thread Ville Mattila
Hello, I was wondering how would it be possible to delete those records from database which has just same data? There can be also up to ten copies of the record in database, and all but one should be deleted. Do you have any easy way to do this? Thank you, Ville Mattila

RE: Removing duplicate entries

2002-01-03 Thread Simon Green
duplicate entries Hello, I was wondering how would it be possible to delete those records from database which has just same data? There can be also up to ten copies of the record in database, and all but one should be deleted. Do you have any easy way to do this? Thank you, Ville Mattila

RE: Removing duplicate entries

2002-01-03 Thread Roger Baklund
* Ville Mattila I was wondering how would it be possible to delete those records from database which has just same data? There can be also up to ten copies of the record in database, and all but one should be deleted. Do you have any easy way to do this? You could do it by creating a new

Removing duplicate entries

2001-08-13 Thread Steve Buehler
I hope that someone here can help me with a little problem. We have a database that has a lot of duplicate entries in it for one of the fields (email). I need to find a way to search the database, find all of the duplicate entries and delete all but one of the entries. It would not be