|
-
Aug 25th, 2006, 05:44 AM
#1
Thread Starter
Member
need advice on recordset table acess
Hi list,
Need the advice from you all.
when user input item ABC, logic will check if division for the itemnumber ABC has another same division value, if yes, logic will delete the duplicate SAME division where the itemnumber is NOT ABC.
Any help how to code this?
i know only need to have these but do not know how to search through the table to check and delete from bof until eof. compared and if found same division but different itemnumber then delete
Dim xx As ADODB.Recordset
Set xx = New ADODB.Recordset
With xxl
.ActiveConnection = cnsql
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open "Select * from table where .....
End With
the total number of records of the table is more than 20k.
division itemnumber
4000 ABC
4000 XYZ (to be deleted)
3840 GHY
4567 PER
5000 ABC
5000 PHJ (to be deleted)
2450 ABC
2450 AQW (to be deleted)
7000 UJI
1740 ABC
1740 WUK (to be deleted)
the records that will be deleted are
4000 XYZ
5000 PHJ
2450 AQW
1740 WUK
thank you very much
Last edited by tango_ben; Aug 25th, 2006 at 05:38 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|