Hi All,
I have a scenario where I have to validate my data against the ranges defined in database.
My Input data looks like-
Employee table
EmployeeID | Role | Age | Salary_in_INR | No_Of_Team_members |
1 | Team lead | 35 | 100000 | 5 |
2 | Manager | 39 | 150000 | 20 |
3 | Developer | 30 | 75000 | 0 |
Ranges for columns are defined in a database table like below.
Range Table
Role | Parameter | Lower_Limit | Upper_Limit |
Team Lead | Age | 25 | 45 |
Manager | Age | 40 | 55 |
Developer | Age | 20 | 35 |
Team Lead | Salary_in_INR | 50000 | 150000 |
Manager | Salary_in_INR | 100000 | 200000 |
Developer | Salary_in_INR | 25000 | 100000 |
Team Lead | No_Of_Team_members | 0 | 4 |
Manager | No_Of_Team_members | 10 | 50 |
Developer | No_Of_Team_members | 0 | 0 |
Based on the ranges defined in the table , I have to perform checks whether values like Age, Salary and No_Of_Team_members are in the range of lower and upper limit.
In above example record of employee id 1 is not valid as he has been assigned 5 team members but upper limit is 4 as defined in range table
Employee id 2 is also not valid because age is not in the range. Only employee id 3 is valid record and should be populated in target. I need to send first two records in error table.
Can you pls help me achieve this?
Regards
Himanshu
Solved! Go to Solution.
Thank you @MarqueeCrew
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |