求助,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 关键字
原语句如下:
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 关键字
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货