Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one Tabele with four columns
calldate datetime ,number1 varchar(50),varchar(50),duration int in this table i have some data like;

calldate number1 number2 duration
2012-06-19 10:22:45.000 165 218 155
2012-06-19 10:22:45.000 165 218 155
2012-06-19 10:22:45.000 165 218 155
2012-06-19 10:27:31.997 919037311144 237 26
2012-06-19 10:27:31.997 919037311144 237 26
2012-06-19 10:27:31.997 919037311144 237 26

Nearly there are 1500 record in that above date (2012-06-19) , duplicate records are nearly 250.

I want to delete that duplicate records for that particular date 2012-06-19.

Please help me.
Thanks.
Posted

1 solution

I would recommend the tip from the following post:

http://www.4guysfromrolla.com/webtech/sqlguru/q051200-2.shtml[^]
 
Share this answer
 
Comments
srinvas 19-Jun-12 18:46pm    
Hi tim,
i am getting duplicate records, but how can i delete that records.
Tim Corey 19-Jun-12 19:30pm    
You need to delete each row that is the same as the row before it. That way you will delete all of the duplicate rows while saving one row for each unique item.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900