Let's say there is a table that has ID#, effective date, status, and some other data. Status is an employee's exempt/non-exempt status. If/when an employee changes from exempt to non-exempt, or vise versa, a new row is created on the table with the effective date of the change. A new row could also be created if some of the "other data" changed and the status did not.
I'm looking for a way to run a query that for some given month, for some list of people, would return:
I haven't been able to get anything to work yet... anyone have any ideas? Is something like this feasible? I believe the type of SQL I'm using is Oracle/PLSQL if that matters. TIA
I'm looking for a way to run a query that for some given month, for some list of people, would return:
- the ID#
- either "exempt" (if they were only exempt each day of the month), "non-exempt" (if they were only non-exempt each day of the month), or "both" (if they were only exempt each day of the month)
- the effective date of the exempt/non-exempt switch if they were "both"
I haven't been able to get anything to work yet... anyone have any ideas? Is something like this feasible? I believe the type of SQL I'm using is Oracle/PLSQL if that matters. TIA