Sunday, April 6, 2014

Query to Get Assignment Purchase Order Information

SELECT per.employee_number,
       per.full_name,
       gsob.name,
       gcc.segment1 entity,
       gcc.segment2 location,
       gcc.segment3 sub_location,
       gcc.segment4 account,
       gcc.segment5 f1
  FROM per_people_x per,
       per_assignments_x paaf,
       gl_sets_of_books gsob,
       gl_code_combinations gcc
 WHERE     per.person_id = paaf.person_id
       AND paaf.assignment_type = 'E'
       AND paaf.primary_flag = 'Y'
       AND paaf.assignment_status_type_id IN (1, 2)
       AND gsob.set_of_books_id = paaf.set_of_books_id
       AND paaf.person_id = :l_person_id
       AND gcc.code_combination_id = paaf.default_code_comb_id

No comments:

Post a Comment