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 (count(ACCOUNTACTION.ACCOUNT

Re: removing duplicate entries

2008-08-11 Thread Moon's Father
> >on A1.ID = U1.ID >where A1.ACTIONDATE like '2008-08-01 02:00%' >and U1.ID is NULL >) as D > ); > > Thanks for the pointers ;-) > > > > > -Original Message----- > From: Magnus Smith [mailto:[EMAIL PROTECTED] > Sen

RE: removing duplicate entries

2008-08-07 Thread Magnus Smith
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. CREATE TABLE ACCOUNTACTION ( ID INT NOT NULL PRIMARY KEY, ACTIONDATE DATETIME, ACCOUNT_ID INT NOT NULL );

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
e '2008-08-01 02:00%' group by ACCOUNTACTION.ACCOUNT_ID having count(ACCOUNTACTION.ACCOUNT_ID) > 1 union select ACCOUNTACTION.ID, ACCOUNTACTION.ACCOUNT_ID from ACCOUNTACTION where ACCOUNTACTION.ACTIONDATE like '2008-08-01 02:00%' group by ACCOUNTACTION.ACCOUNT_ID having c

Re: removing duplicate entries

2008-08-06 Thread Ananda Kumar
; > > -- > *From:* Ananda Kumar [mailto:[EMAIL PROTECTED] > *Sent:* 06 August 2008 10:11 > *To:* Magnus Smith > *Cc:* mysql@lists.mysql.com > *Subject:* Re: removing duplicate entries > > > I doubt the belwo sql will give you duplcates

RE: removing duplicate entries

2008-08-06 Thread Magnus Smith
8 10:11 To: Magnus 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 ACCO

Re: removing duplicate entries

2008-08-06 Thread Ananda Kumar
I doubt the belwo sql will give you duplcates select 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.ID!=

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 | PRI

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

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

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

2001-08-14 Thread Steve Buehler
Thank You so very much. Your way was great, fast and efficient. Here is my line of code: insert into sub2 (email,list_id) select email, list_id from subscribers; Thanks Again Steve Buehler At 03:31 AM 8/14/2001, you wrote: >I'd do it this way: > >insert into table table_new >select f

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 pract