Sunday, August 4, 2013

Query to Get Employee GOSI Details from Assignment

SELECT per.employee_number,
       per.full_name,
       ppf.payroll_name,
       hscf.concatenated_segments gosi_concatenated_segments,
       SUBSTR (hscf.concatenated_segments,
               0,
               INSTR (hscf.concatenated_segments, '.') - 1)
          employer
  FROM per_assignments_x paaf,
       hr_soft_coding_keyflex hscf,
       pay_payrolls_f ppf,
       per_people_x per
 WHERE     paaf.soft_coding_keyflex_id = hscf.soft_coding_keyflex_id
       AND paaf.payroll_id = ppf.payroll_id
       AND per.person_id = paaf.person_id
       AND paaf.assignment_status_type_id = 1
       AND paaf.assignment_type = 'E'
       AND paaf.primary_flag = 'Y'

No comments:

Post a Comment