Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7729 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.