Jump to content

Comparing Class Lists


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

Recommended Posts

  • Newbies

Desperately hoping for help...

I have 20 class lists - each class list is stored as a a seperate database, with each record within the database representing a student (by name).

I need to create a script that will count the number of students common to each class. For instance, it will compare Class A and Class B, and generate a number based on which students are common to both.

I know this must be possible, but it makes my head hurt trying to figure it out...thanks!

Link to comment
Share on other sites

I would concatenate all the files together. Add a Class field in the new file to identify the class, and then bring in all the records from all of the other files. This new file should be much easier to work with in many ways.

For your current problem, create an additional number field called Flag.

1. Show all records.

2. Use the replace command to set the Flag field to 0 for all records.

3. Find all records where Class=A.

4. Use the replace command to set the Flag field to 1 for the found set.

5. Find all records where Flag=1 and Class=B

The resulting found set will be students common to both class A and B.

[This message has been edited by BobWeaver (edited March 09, 2001).]

Link to comment
Share on other sites

This topic is 7828 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
 Share

×
×
  • Create New...

Important Information

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