 |
ahmad Level: Master
 Registered: 03-02-2003 Posts: 120
|
How to remove duplicate records through code
Good Day
I have Microsoft Access 2003 at back end and VB6 at front end
need to delete duplicate records from a table.
The duplicate condition depends upon the matching of 4 fields
other then Primary Key.
e.g
Table S_T
id Fld A Fld B Fld C Fld E
1 a b c d
2 a b d
3 x y z r
4 a b c d
5 x y z r
6 a b c d
if the combination of field A,B,C and D is repeated then only one id should remain.Like Id 1,4 and 6 are fulfilling the duplicate
condition i mentioned so ID 1 should remain and 4,6 should be deleted.Note id 2 has Fld C null so it is not fulfilling the duplicate condition.
id 3 and 5 are also fulfiling condition so id 3 is retained and 5 is deleted
Can anyone help how this could be done in VB 6
____________________________
@#@#@
|
|
28-11-2006 at 11:12 AM |
|
|
|
|
 |
 |