technoranger Posted November 19, 2003 Posted November 19, 2003 I have a database with 5400 records made up of about 700 students. The file was designed so a new record was created each time a student took a different class. I need to pull out a set of records that are just one record for each individual student. I have an ID field that is a unique identifier, but I'm not sure how to write a script that will compare the ID Field in record 1 with the ID field in record two and if the records match delete the record then repeat and if not go to the next record. I may have records 1 through 4 be duplicates then 5 through 11 be duplicates. I'd like to automatically compare and delete 1 - 3, see that 4 does not equal 5 so it is not deleted, compare and delete 5 - 10...and so on through 5400 records. Any ideas?? Rick
spb Posted November 19, 2003 Posted November 19, 2003 The manual that comes with FM 5 has a great example script for doing this, on page 10-13. If you are new to FM, figuring out how to adapt this to your situation is a great painless tutorial in loops, global fields and scripting in general. I've used countless versions of this. In your case, a few tweaks to the example script would be all you need. You have to decide what you mean by one record "equaling" another. How many fields does a record have? Ten? If so, does "equal" mean all ten match? Or a critical eight of the fields match? Or just one key field besides the unique identifier? Answer this & the example script rewrites itself. Steve Brown
Recommended Posts
This topic is 7678 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