Newbies BugBoy Posted March 9, 2001 Newbies Posted March 9, 2001 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!
BobWeaver Posted March 9, 2001 Posted March 9, 2001 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).]
Recommended Posts
This topic is 8665 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