Genx Posted July 28, 2006 Posted July 28, 2006 Hi All, I've got a situation where i need to isolate all records with the same value in a particular field. I.e. locate all duplicates and act on each set of duplicates individually. e.g. Rec 1: 0421223223 Rec 2: 0421223223 Rec 3: 0412311311 Rec 4: 0412311311 Rec 5: 0412311311 Rec 6: 0422102123 Duplicate values are in Rec 1 & 2 and then 3 & 4 & 5. I need to be able to isolate records 1 & 2 first for example, act on those (i.e. delete 1) then isolate the next set of duplicates (3 & 4 & 5) and remove 2 of those so only one remains. Anyone have any bright ideas? Any input appreciated. Cheers, ~Genx
Ender Posted July 28, 2006 Posted July 28, 2006 (edited) Something like this should work: Sort Records [ No Dialog; by field ] Set Variable [ $value ; field ] Go to Record/Request/Page [ Exit after last; Next ] Loop If [ field = $value ] Delete Record [ No Dialog ] Exit Loop If [ get(recordnumber) = get(foundcount) ] Else Set Variable [ $value ; field ] Go to Record/Request/Page [ Exit after last; Next ] End If End Loop Edited July 28, 2006 by Guest
Genx Posted July 28, 2006 Author Posted July 28, 2006 Never even thought of sorting the records. Cheers Ender, ~Genx
Recommended Posts
This topic is 6696 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now