2869: cp_effective_date in date) is
2870: select count(*)
2871: from per_spinal_points psp,
2872: per_spinal_points psp2,
2873: per_spinal_point_steps_f psps,
2874: per_spinal_point_steps_f psps2
2875: where psps.step_id = cp_sp_ceil_step_id
2876: and psp.spinal_point_id = psps.spinal_point_id
2877: and psps.grade_spine_id = psps2.grade_spine_id
2870: select count(*)
2871: from per_spinal_points psp,
2872: per_spinal_points psp2,
2873: per_spinal_point_steps_f psps,
2874: per_spinal_point_steps_f psps2
2875: where psps.step_id = cp_sp_ceil_step_id
2876: and psp.spinal_point_id = psps.spinal_point_id
2877: and psps.grade_spine_id = psps2.grade_spine_id
2878: and psp2.spinal_point_id = psps2.spinal_point_id