MySQL Forums
Forum List  »  Quality Assurance

HELP, QUERY PROBLEMS
Posted by: Toby Yu
Date: December 10, 2007 09:35AM

Dear all,

I got a table which contains the following fields:

ResultsID, Site, DateStamp, Result, Annual,AssignmentID, RiskID, Rank

In the existing table, I wanna delete the duplicated data. The duplicated data can be described as only DateStamp and ResultsID field value are different whereas all the other fields are all the same.
Eg:
ResultsID, Site, DateStamp, Result, Annual,AssignmentID, RiskID, Rank
1250 MSM 2007-10-11 OK 128.50 130332 63 2
1251 MSM 2007-10-12 OK 128.50 130332 63 2
1253 ABC 2007-10-11 OK 118.40 130332 63 1

these first two records can be considered as the duplicated ones coz the oly difference between them are ResultID and Datestamp. How I can delete the duplicated records? and just keep one record.

Any reply will be appreciated!



Edited 4 time(s). Last edit at 12/10/2007 09:38AM by Toby Yu.

Options: ReplyQuote


Subject
Views
Written By
Posted
HELP, QUERY PROBLEMS
3146
December 10, 2007 09:35AM
2191
December 12, 2007 08:13AM
2182
January 10, 2008 02:29AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.