“This query is used to get the person number of employees who are eligible in a compensation workforce plan.”

“This query is used to get the person number of employees who are eligible in a compensation workforce plan.”

“This query is used to get the person number of employees who are eligible in a compensation workforce plan.”

This query selects the PERSON_NUMBER from the CMP_CWB_PERSON_INFO table for individuals included in a compensation workforce plan. It joins CMP_CWB_PERSON_RATES to retrieve the corresponding rate and eligibility information for each person within the same PLAN_ID and PERIOD_ID. The query filters records where the COMPONENT_ID is -1 and the ELIG_FLAG is ‘Y’, indicating that the employee is eligible within the compensation plan. Additional filters for PLAN_IDPERSON_NUMBER, and a custom segment are present but currently commented out. The result returns the person numbers of employees eligible for the compensation plan. 

SQL Query Section 

SELECT 

A.PERSON_NUMBER 

FROM 

CMP_CWB_PERSON_INFO A ,  

CMP_CWB_PERSON_RATES  B 

WHERE 

1=1 

--AND A.PLAN_ID = 300000117565485 

--and A.PERSON_NUMBER=:{PARAMETER.PERSON_NUMBER} 

--and A.CUSTOM_SEGMENT47 = 10 

and A.PERSON_ID = B.PERSON_ID 

and A.PLAN_ID = B.PLAN_ID 

AND A.PERIOD_ID = B.PERIOD_ID 

and COMPONENT_ID = -1 

and B.ELIG_FLAG = 'Y'  

Output Results 

Leave a Reply

Your email address will not be published. Required fields are marked *