Hi All,
I have my table with duplicate records. the duplicate records have the same ESN and Shipdate the difference is the time. there is no transaction in same date. That's why i would like to remove the other records. I need your help guys.
How to this.
1. I need to find all this records with the same ESN and the same Shipdate with different time.
2. How to delete this records and retain only 1 esn with the same shipdate
3. I would like to replace the time into 00:00:00 next time i upload the records into my history table.
Here is the sample:
MyTABLE
Create Table Mytable
(ESN varchar(35), Shipdate datetime)
Insert into Mytable (ESN, Shipdate) values ('268435457314195510','2011-02-18 19:35:34.263')
Insert into Mytable (ESN, Shipdate) values ('268435457314195510','2011-02-18 19:42:25.917')
Insert into Mytable (ESN, Shipdate) values ('268435457314207074','2011-02-18 19:35:32.727')
Insert into Mytable (ESN, Shipdate) values ('268435457314207074','2011-02-18 19:42:25.663')
Thank you in advance.
Jonel