You can simply use the following query:
ALTER IGNORE TABLE <your_table> ADD UNIQUE INDEX(cli,type,status);
On 9/25/06, gerodim <gerodim@stripped> wrote:
> Hi there, I have this serious issue about a db i have to work with....
> Thing is there is a table called cpsorders....
> This table has a structure like this...
> 27425-210201021-XOR-3-0000-00-00 00:00:00-2005-03-09 00:00:00-2006-05-23
> 23:49:42-2005-03-09 00:00:00-TD4-TD
> 289267-210201021-XOR-3-0000-00-00 00:00:00-2005-03-09 00:00:00-2006-05-26
> 13:37:27-2005-03-09 00:00:00-TD4-TD
> there are a lot of duplicate entries there...
> What i need to do is to find out the entries that have the same
> cli,type,status (the rest are not so important) and delete all BUT ONE! I
> have no clue as to how i can delete all but one... Also the rest of the
> may differ a little bit (datetimes for example) so i can't group them....
> Any ideas?
> View this message in context:
> Sent from the MySQL - General mailing list archive at Nabble.com.
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
" Time is what we want most, but what we use worst "