ngwaltne Posted September 26, 2003 Posted September 26, 2003 I have a student database based on student ID. I would like to search the db and delete duplicates. Trying to think this out. Not very experienced. How about this. Go to field StudentID Insert ! Find Now I have all the duplicates Can I have the script delete every second record? Thanks for your help in Advance
Ugo DI LUCA Posted September 26, 2003 Posted September 26, 2003 Hi, This thread explains the process : Calcing a field to purge duplicates Now, as this comes up about 10 times a month, and he surely was getting lazy, Andy uploaded a sample on his Web Site. Andy Gaunt technique .
spb Posted September 26, 2003 Posted September 26, 2003 Also, the FM 5.0 and 5.5 manual uses this problem as its sample script example. I don't know if it is also in the 6.0 manual. Steve Brown
ngwaltne Posted September 26, 2003 Author Posted September 26, 2003 I am working with andy's FindDuplicates solution. Thanks andy. I have it all set up but am getting all 1s in the Count in last Record field. I can see the duplicates in the other field. Any idea why this is so? I have been working with it for awhile. When I do get 0s can I just delete them? Thanks in Advance norm
stuj1026 Posted September 29, 2003 Posted September 29, 2003 you need a couple of extra fields Global_Mark Flag_to_Delete Script Goto Record(first) Set Field (Global_mark,StudentID) Loop Goto Record Next(exit after last) if(studentid=Global_Mark) set field (flag to delete,"x") else Set field (global_mark,StudentID) end if end loop Make sure you sort your db by studentID before running script. Then just delete all the records that have an x in the flag to delete field Stu
Recommended Posts
This topic is 7729 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