734: ) is
735: --
736: CURSOR c_dhw_bg_check is
737: select distinct(pet.business_group_id) bg
738: from hxt_det_hours_worked_f dhw
739: , pay_element_types_f pet
740: where dhw.tim_id = p_tim_id
741: and dhw.element_type_id = pet.element_type_id
742: and pet.business_group_id is not null
741: and dhw.element_type_id = pet.element_type_id
742: and pet.business_group_id is not null
743: union
744: select distinct(ass.business_group_id) bg
745: from hxt_det_hours_worked_f dhw
746: , per_assignments_f ass
747: where dhw.tim_id = p_tim_id
748: and dhw.assignment_id = ass.assignment_id;
749: --