hi.. i need help in comparing value from the same table for my final project.
example :
table 1 :
SubjectCode Classes
Sub A class 1
Sub A class 2
Sub A class 3
Sub B class 2
Sub B class 3
Sub B class 4
Sub B class 5
Sub C class 6
Sub C class 7
Sub C class 8
...
my task is, i need to compare the classes in the subject. Sub A with class 1, class 2, class 3 have to compare with Sub B and Sub C. if classes from Sub A exist in Sub B then the output is 0, if not the output is 1. then Sub A again will compare with Sub C and the rest. After Sub A compare its value with other subject. Sub B will start comparing with all the subject and so on. Below is the concept.
Sub A Sub B Sub C
Sub A 0 0 1
Sub B 0 0 0
Sub C 1 0 0
i really don't know to do the loop.. seeking for your help.. thank you.