<i><b>Originally posted by : Gaurang (gvyas2000@hotmail.com)</b></i><br />I receive the data into one of my tables from a text file which has some duplicate records. How do I delete them. For example:<br />Field1 Field2<br />1 AB DE<br />2 AB DE<br />3 AB 12<br /><br />So here 1 and 2 are duplicates but 3 is not since the Field2 is not the same. So basically all the fields value has to be same not just one field. <br />I was thinking of writing some kind of SP to search those duplicates or a trigger, how to do that?<br />
<i><b>Originally posted by : Dave B (david_baylor@yahoo.com)</b></i><br />Just create an index on the table that includes both fields and set it to "No Duplicates"<br /><br /><br />------------<br />Gaurang at 3/28/2000 7:46:01 AM<br /><br />I receive the data into one of my tables from a text file which has some duplicate records. How do I delete them. For example:<br />Field1 Field2<br />1 AB DE<br />2 AB DE<br />3 AB 12<br /><br />So here 1 and 2 are duplicates but 3 is not since the Field2 is not the same. So basically all the fields value has to be same not just one field. <br />I was thinking of writing some kind of SP to search those duplicates or a trigger, how to do that?<br />
Was this answer helpful ?
Yes No