10: --
11: type block_record is record (
12: per_type_id per_all_people_f.person_type_id%type := null,
13: person_type_usages varchar2(32000),
14: asg_id per_all_assignments_f.assignment_id%type := null,
15: asg_status per_all_assignments_f.assignment_status_type_id%type := null,
16: asg_primary per_all_assignments_f.primary_flag%type := null,
17: asg_employment_category per_all_assignments_f.employment_category%type := null,
18: asg_freq per_all_assignments_f.frequency%type := null,
11: type block_record is record (
12: per_type_id per_all_people_f.person_type_id%type := null,
13: person_type_usages varchar2(32000),
14: asg_id per_all_assignments_f.assignment_id%type := null,
15: asg_status per_all_assignments_f.assignment_status_type_id%type := null,
16: asg_primary per_all_assignments_f.primary_flag%type := null,
17: asg_employment_category per_all_assignments_f.employment_category%type := null,
18: asg_freq per_all_assignments_f.frequency%type := null,
19: asg_hours per_all_assignments_f.normal_hours%type := null,
12: per_type_id per_all_people_f.person_type_id%type := null,
13: person_type_usages varchar2(32000),
14: asg_id per_all_assignments_f.assignment_id%type := null,
15: asg_status per_all_assignments_f.assignment_status_type_id%type := null,
16: asg_primary per_all_assignments_f.primary_flag%type := null,
17: asg_employment_category per_all_assignments_f.employment_category%type := null,
18: asg_freq per_all_assignments_f.frequency%type := null,
19: asg_hours per_all_assignments_f.normal_hours%type := null,
20: asg_type per_all_assignments_f.assignment_type%type,
13: person_type_usages varchar2(32000),
14: asg_id per_all_assignments_f.assignment_id%type := null,
15: asg_status per_all_assignments_f.assignment_status_type_id%type := null,
16: asg_primary per_all_assignments_f.primary_flag%type := null,
17: asg_employment_category per_all_assignments_f.employment_category%type := null,
18: asg_freq per_all_assignments_f.frequency%type := null,
19: asg_hours per_all_assignments_f.normal_hours%type := null,
20: asg_type per_all_assignments_f.assignment_type%type,
21: ctr_type per_contracts_f.type%type := null,
14: asg_id per_all_assignments_f.assignment_id%type := null,
15: asg_status per_all_assignments_f.assignment_status_type_id%type := null,
16: asg_primary per_all_assignments_f.primary_flag%type := null,
17: asg_employment_category per_all_assignments_f.employment_category%type := null,
18: asg_freq per_all_assignments_f.frequency%type := null,
19: asg_hours per_all_assignments_f.normal_hours%type := null,
20: asg_type per_all_assignments_f.assignment_type%type,
21: ctr_type per_contracts_f.type%type := null,
22: ctr_fr_person_replaced per_contracts_f.ctr_information5%type := null,
15: asg_status per_all_assignments_f.assignment_status_type_id%type := null,
16: asg_primary per_all_assignments_f.primary_flag%type := null,
17: asg_employment_category per_all_assignments_f.employment_category%type := null,
18: asg_freq per_all_assignments_f.frequency%type := null,
19: asg_hours per_all_assignments_f.normal_hours%type := null,
20: asg_type per_all_assignments_f.assignment_type%type,
21: ctr_type per_contracts_f.type%type := null,
22: ctr_fr_person_replaced per_contracts_f.ctr_information5%type := null,
23: ctr_status per_contracts_f.status%type := null,
16: asg_primary per_all_assignments_f.primary_flag%type := null,
17: asg_employment_category per_all_assignments_f.employment_category%type := null,
18: asg_freq per_all_assignments_f.frequency%type := null,
19: asg_hours per_all_assignments_f.normal_hours%type := null,
20: asg_type per_all_assignments_f.assignment_type%type,
21: ctr_type per_contracts_f.type%type := null,
22: ctr_fr_person_replaced per_contracts_f.ctr_information5%type := null,
23: ctr_status per_contracts_f.status%type := null,
24: ass_employee_category hr_soft_coding_keyflex.segment2%type := null,
38: is
39: -- scan all employees in the given year
40: select distinct a.person_id
41: from per_assignment_status_types t,
42: per_all_assignments_f a
43: where t.assignment_status_type_id = a.assignment_status_type_id
44: and t.per_system_status in ('ACTIVE_ASSIGN','SUSP_ASSIGN'
45: ,'ACTIVE_CWK','SUSP_CWK_ASG')
46: and a.establishment_id = p_establishment_id
55: is
56: -- scan all assignments for the given employee
57: select distinct a.assignment_id asg_id
58: from per_assignment_status_types t,
59: per_all_assignments_f a
60: where a.person_id = p_person_id
61: and t.assignment_status_type_id = a.assignment_status_type_id
62: and nvl(t.per_system_status,' ') in ('ACTIVE_ASSIGN','SUSP_ASSIGN'
63: ,'ACTIVE_CWK','SUSP_CWK_ASG')
80: asg.effective_end_date asg_to
81: from
82: per_disabilities_f pdf,
83: per_assignment_status_types typ,
84: per_all_assignments_f asg
85: where asg.person_id = pdf.person_id
86: and asg.assignment_type = 'E'
87: and typ.assignment_status_type_id = asg.assignment_status_type_id
88: and typ.per_system_status in ('ACTIVE_ASSIGN','SUSP_ASSIGN')