30: function getNextPosition(positionIdIn in integer) return integer as
31: cursor positionCursor(positionIdIn in integer) is
32: select str.parent_position_id
33: from
34: per_pos_structure_elements str,
35: per_pos_structure_versions psv,
36: per_position_structures pst
37: where
38: str.subordinate_position_id = positionIdIn
42: and trunc(sysdate) between psv.date_from and nvl( psv.date_to , sysdate);
43: cursor positionCursor2(positionIdIn in integer,posStrIdIn in integer) is
44: select str.parent_position_id
45: from
46: per_pos_structure_elements str,
47: per_pos_structure_versions psv,
48: per_position_structures pst
49: where
50: str.subordinate_position_id = positionIdIn