{1} where t.pline_code={0} and t.schedule_min>{1} ORDER BY T.Schedule_Min ) test where ROWNUM =1 union all select ex.cost_price from (select t.cost_price from cost_base_processcost_c t where t.pline_code={0} and t.schedule_max>{1} and t.schedule_min<{1} order by t.schedule_min desc ) ex where rownum=1 ]]>