Hellow all...Can someone help me solving this problem please:
1.I have a table named tblCourseVacancy which has column like this:
course_id course_name course_vac
1 A 30
2 B 30
3 C 40
4 D 45
5 E 30
2. Now applicant can make 2 choices and he can also opted for any course by a checkbox which stores in a table named tblApplicantDetails like this:
applicant_no opted_course_id_1 opted_course_id_2 anycourse date_of_retirement
123456 1 3 0 25-06-2015
123457 5 2 1 21-07-2015
123478 1 2 1 29-09-2015
123421 2 1 0 25-01-2016
...............................................................................................................................................................................................
222543 5 1 1 23-07-2017
3.Now my requirement is:
a. Applicant will be selected who will retire first and if the date is same then as per applicant_no seniority .
b. He will be selected in the available course vacancy according to his first choice , if not then to his second choice and even if not then,if there any course vacancy which is not fulfilled then to that course if he has checked yes to any course checkbox.
Thanks in advance.