I need the help of this forum.
I have a text table which has only two fields: “Student Name” and “Test approved”. This table lists all the students that have approved different tests, but only 3 tests are mandatory (necessary) to be promoted, which are: “test_1” ; “ test_2” and “ test_3” .
The remaining tests (like “test_4”; “test_5”, etc.) are optional, because they are not necessary for a student to be promoted.
I need a script (Bash or Perl, etc. or Excel or Access) to accomplish the task of adding to the table a third field “Final Result”, having the result of the recursive search that has to be done.
This field, “Final Result”, can only have one of the following possible results:
• “Promoted” : only if test_1 AND test_2 AND test_3 were approved.
• “Not_Promoted_Fail Test_1” : because has failed test_1, even if has approved other mandatory tests or optional tests.
• “Not_Promoted_Fail Test_2” : because has failed test_2, even if has approved test_1 and test_3, or other optional tests.
• “Not_Promoted_Fail Test_3” : because has failed test_3”, even if has approved test_1 and test_2.
This is the final result (a new text table) which I need:
"Student Name" "Test approved" "Final Result"
Peter Test_1 Promoted
Peter Test_5 Promoted
Peter Test_3 Promoted
Peter Test_2 Promoted
John Test_3 Promoted
John Test_2 Promoted
John Test_1 Promoted
John Test_6 Promoted
Mary Test_4 Not_Promoted_Fail Test_2
Mary Test_1 Not_Promoted_Fail Test_2
Mary Test_3 Not_Promoted_Fail Test_2
Mary Test_7 Not_Promoted_Fail Test_2
Mary Test_5 Not_Promoted_Fail Test_2
Mary Test_6 Not_Promoted_Fail Test_2
Robert Test_2 Not_Promoted_Fail Test_1
Robert Test_3 Not_Promoted_Fail Test_1
Jane Test_1 Not_Promoted_Fail Test_3
Jane Test_2 Not_Promoted_Fail Test_3
Jane Test_7 Not_Promoted_Fail Test_3
Many thanks to all of you!
Vincenzo Natale (Argentina)
vinnat@speedy.com.ar