求助,sql语句传到数据库少了一半。
原语句如下:
select sps.*,
       sum(sps.upl_insu_day_count) over(partition by sps.canal order by sps.create_time) as upl_insu_day_total
  from SMS_PUSH_STATISTICS sps
 where 1 = 1
 order by sps.create_time desc
用hibernate传到后面执行时就被截断了:
            org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [select count(*) from ( select sps.id,         sum(sps.upl_insu_day_count) over(partition by sps.canal )]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00923: 未找到要求的 FROM 关键字

解决方案 »

  1.   

    每次都在sum over那里截断
      

  2.   

    把over删了,语句就不被截断了,但是我现在要用这个啊,大佬帮忙看看啊
      

  3.   

    不懂hibernate,爱莫能助我觉得你发错版块了,这不是oracle的问题
      

  4.   

    看着像自动分页的问题,不过你又不上代码,没法判断。这个应该发到java板块
      

  5.   

    用hibernate传到后面执行时就被截断了看来是Java程序的问题。
      

  6.   

    好的,去java看下