select * from
(
select * from table_name 
where 金额 > 对象金额 and 开始日<= '20041231' and 
      开始日 =(select 开始日 
                  from (select * from table_name where 金额 > 对象金额 and 开始日 
                         <= '20041231' order by 开始日 desc )
               where rownum = 1)
order by 金额
)
where rownum = 1

解决方案 »

  1.   

    select * from
    (
    select * from table_name 
    where 金额 > 对象金额 and 开始日<= '20041231' and 
          开始日 =(select 开始日 
                      from (select * from table_name where 金额 > 对象金额 and 开始日 
                             <= '20041231' order by 开始日 desc )
                   where rownum = 1)
    order by 金额
    )
    where rownum = 1