SELECT *
  FROM (SELECT   tvoyage0_.voyagekey AS x0_0_, tvoyage0_.vesseleng AS x1_0_,
                 tvoyage0_.vesselchn AS x2_0_, tvoyage0_.arrive_date AS x3_0_,
                 tvoyage0_.region AS x4_0_, tvoyage0_.i_voyage AS x5_0_,
                 tvoyage0_.e_voyage AS x6_0_, tvoyage0_.to_port_chn AS x7_0_,
                 tvoyage0_.i_e AS x8_0_, tvoyage0_.custom_bh AS x9_0_,
                 tvoyage0_.wzh AS x10_0_, tvoyage0_.yardman AS x11_0_,
                 tvoyage0_.wq_name AS x12_0_, tvoyage0_.shipcode AS x13_0_
            FROM t_voyage tvoyage0_
           WHERE (statue BETWEEN '2' AND '4')
        ORDER BY arrive_date DESC)
 WHERE ROWNUM <= ?你自己看呢,子表里用这个order by 并无意义。所以oracle认为这句ORDER BY arrive_date DESC)是错的,连带后面的括号也失效了,所以会报少了一个右括号

解决方案 »

  1.   

    那么在oracle下hibernate里如何分页阿。
      

  2.   

    8i不支持子查询中的order by语法
      

  3.   

    8.0.5不支持子查询中的order by语法
      

  4.   

    纳在这种情况下,如何利用hibernate分页阿,做过的给解答一下阿。
      

  5.   

    select /*+first_rows*/* from (select * from 表名 where rownum<=20*第几页 order by 排序的字段 desc ) where rownum<=20 order by 排序的字段
    每页20行记录
      

  6.   

    上面我写错了。N为第几页,每页20行记录.select * from (select * from (select a.*,rownum rn from 表名 order by 排序的字段) b where b.rn<=20*N) c where c.rn>20*(N-1)