163: -- done.
164: --
165: cursor csr_sequence_number is
166: select sps.sequence,spp1.parent_spine_id
167: from per_spinal_point_placements_f spp1,
168: per_spinal_point_placements_f spp2,
169: per_spinal_point_steps_f sps
170: where spp1.step_id = sps.step_id
171: and p_effective_date = spp1.effective_start_date
164: --
165: cursor csr_sequence_number is
166: select sps.sequence,spp1.parent_spine_id
167: from per_spinal_point_placements_f spp1,
168: per_spinal_point_placements_f spp2,
169: per_spinal_point_steps_f sps
170: where spp1.step_id = sps.step_id
171: and p_effective_date = spp1.effective_start_date
172: and spp2.effective_start_date = spp1.effective_end_date +1
178: -- with same parent spine
179: --
180: cursor csr_future_record is
181: select parent_spine_id
182: from per_spinal_point_placements_f
183: where placement_id = p_placement_id
184: and parent_spine_id = p_parent_spine_id
185: and p_effective_date between effective_start_date
186: and effective_end_date;
270: nvl(paa.special_ceiling_step_id,pgs.ceiling_step_id)
271: into l_ceiling_step_id, l_special_ceiling_step_id
272: from per_grade_spines_f pgs,
273: per_spinal_point_steps_f sps,
274: per_spinal_point_placements_f spp,
275: per_all_assignments_f paa
276: where pgs.grade_spine_id = sps.grade_spine_id
277: and paa.assignment_id = spp.assignment_id
278: and spp.assignment_id = p_assignment_id