Can someone please help me with the logic to build below?
Please refer to the input data tables listed below.
I have to assign the students as per the teacher’s values.
e.g., the first teacher, Shubam, has to get 3 students from the second data table; for the next teacher, Ravi, he has to get the next 2 students from the second data table. Like wise, all the distribution has to be done.
For shubam , the first 3 register number will be assigned from table 2 as per his value column in table 1,
for Ravi, the next 2 register number will be assigned from table 2 as per his value column in table 1,
for Aarthi, the next 5 register number will be assigned from table 2 as per his value column in table 1,
since the total count of table is 10, Subraja won’t get any.