RE: removing duplicate entries

2008-08-07 Thread Magnus Smith
ount(A3.ACCOUNT_ID) = 1 ) as U1 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] Sent: 07 August 2008

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 Magnus Smith
UNTACTION where ACCOUNTACTION.ACTIONDATE like '2008-08-01 02:00%' group by ACCOUNTACTION.ACCOUNT_ID having (count(ACCOUNTACTION.ACCOUNT_ID) > 1 and ACCOUNTACTION.ID <http://accountaction.id/> =min(accountaction.id); I would use the first select statement.

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