Onkar Bahirat

Onkar Bahirat

  • NA
  • 1
  • 690

Column Search based on Percentage / number of fields

Mar 16 2016 8:12 AM

We need to search data from 27 fields each field will have Priority from 1,2 or 3

We need to generate 3 List

List 1: Match All Fields Of Priority 1

List 2:

Match All Fields of Priority 1 AND Fields with Priority 2 80% of total Priority 2 fields AND Fields withPriority 3 70% of total Priority 3 fields

List 3:

Match Priority 1 Fields 90% of total selected Priority 1 Fields AND Match Priority 2 Fields 70% of total selected Priority 2 Fields AND Fields with Priority 3 50% of total Priority 3 fields

Additional Information

There is a table employee_ServiceTotal,So I want Find Those Employee who fits in the Requirement Based On priority i am making Query prioritywise,so there Will be 3 Subquery(pr1,pr2,pr3) based on priority,these subquery needs to be Executed based on percentage

List 1:Priority1 with all fields(100%) Query:Select * from VwEmployeeGet where Emp_Id in(select Disctint(EMp_Id) from vwEmployee_ServiceTotalget where pr1)

List 2:Priority1 with 100% and 80% of fields whose priority is 2 and 70% of fields whose priority is 3 Query:Select * from VwEmployeeGet where Emp_Id in(select Disctint(EMp_Id) from vwEmployee_Certificateget where pr1(100%) and pr2(80%) and pr3(70%))

List 3:Priority1 with 90% and 70% of fields whose priority is 2 and 50% of fields whose priority is 3 Query:Select * from VwEmployeeGet where Emp_Id in(select Disctint(EMp_Id) from vwEmployee_Certificateget where pr1(90%) and pr2(70%) and pr3(50%))

List 4:Priority1 with 80% and 50% of fields whose priority is 2 and 30% of fields whose priority is 3 Query:Select * from VwEmployeeGet where Emp_Id in(select Disctint(EMp_Id) from vwEmployee_Certificateget where pr1(80%) and pr2(50%) and pr3(30%)