12.07.2015 Views

Administrator Guide - Noetix Technical Support

Administrator Guide - Noetix Technical Support

Administrator Guide - Noetix Technical Support

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Reporting ChangesOne of the challenges with historical data is to find out the record where a change inthe required value occurred for the first time. For example, you want to create a reportdisplaying the names of the supervisors who changed during the course of work on anassignment. There may be several rows of assignment data where something elsechanged except the supervisor name. You should use the following expression to limityour query to only those rows where the supervisor is different from the previous row:EXISTSSELECT 1 FROM ."HR_Emp_Assign_Hist" aWHERE a.Assignment_Number ="HR_Emp_Assign_Hist"."Assignment_Number"AND a.Business_Group = "HR_Emp_Assign_Hist"."Business_Group"AND a.Current_Employee_Flag = 'Y'AND a.Primary_Flag = 'Y'AND a.Supervisor_Employee_Number "HR_Emp_Assign_Hist".Supervisor_Employee_NumberAND a.Effective_End_Date ="HR_Emp_Assign_Hist".Effective_Start_Date - 1)NOTE: The carriage returns are invalid in expressions. They are added here for readability,and you should remove it in your expression.This example takes advantage of the fact that effective dates are always contiguous. Theeffective end date in the subquery will be one day previous to the start date of the mainquery.Such techniques require a fairly high level of SQL skill, but once they are developed, itis much easier to clone and adapt them. For example, it would be fairly simple tomodify the earlier code to detect job changes.Appendix A: Module-Specific Information 329

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!