oracle8.1.7
select sort_order
from (select sort_order
from ims_cp_items
where parent_item=:parent_item
and sort_order > :sort_order
order by sort_order) s
where s.rownum = 1
select sort_order
from (select sort_order
from ims_cp_items
where parent_item=:parent_item
and sort_order < :sort_order
order by sort_order desc) s
where s.rownum = 1