I would like to know how to loop through the attached sample data and create a new table.
Everytome the EmployeeId and DeptID changes a record is written to the new table with the following information:
NewDeptCode DeptID on newest AuditDt
Old DeptCode DeptIF from prior AuditDt
NewJobCode Job on newest AuditDt
OldJobCode Job on prior AuditDt