tcimis
MIS
- Jun 6, 2002
- 32
We are on PS 8.9, Oracle Database. I am trying to write a query to track department changes. The action used is not always department change. I am joining Job to Employees and selecting where employees.deptid <> job.deptid. This works fine with the exception of when multiple changes are made on the same date:
For example:
Employee A has a supervisor change on 5/16 with a seq 0, a pay rate change with a seq 1 and a department change with a seq 2. The current record is dated 7/25 with a location change with a seq 0. With the query the way I currently have it, it appears the department change was done on 7/25 because the current record department <> the previous records seq 1. How do I write the query so that it compares the 5/16 seq 1 record with the 5/16 seq 2 record? I only have access to the PeopleSoft query tool so I am also constrained by the search view.
Hope this makes sense.
Thanks for your assistance.
For example:
Employee A has a supervisor change on 5/16 with a seq 0, a pay rate change with a seq 1 and a department change with a seq 2. The current record is dated 7/25 with a location change with a seq 0. With the query the way I currently have it, it appears the department change was done on 7/25 because the current record department <> the previous records seq 1. How do I write the query so that it compares the 5/16 seq 1 record with the 5/16 seq 2 record? I only have access to the PeopleSoft query tool so I am also constrained by the search view.
Hope this makes sense.
Thanks for your assistance.