运行此SQL语句时:
select TimeInterval,
((((Timer*60)/1.0)*100)/((10.0*60)/60.0)) as 'Throughput-run_1_8_11'
from StatExternalData, StatisticDefinition
where StatisticDefinition.ID=StatExternalData.StatDefId
and StatisticName='PSI_CompTran_Successful_Cnt'
order by TimeInterval asc
我收到此错误:
"select TimeInterval, ((((Timer*60)/1.0)*100)/((10.0*60)/60.0)) as 'Throughput-run_1_8_11'[*] from StatExternalData, StatisticDefinition where StatisticDefinition.ID=StatExternalData.StatDefId and StatisticName='PSI_CompTran_Successful_Cnt' order by TimeInterval asc";
expected "identifier"; [42001-185]
我已经发现[*]表明该声明的哪一部分不正确,H2错误代码42001表示无效的SQL声明,但我一直在敲打我的脑袋几个星期试图找出问题所在,有人有想法吗?
答案 0 :(得分:0)
我有同样的问题:
我的实体看起来像这样:
@Entity
public class ShopCommentRating {
@NotNull
private Boolean like;
}
生成的查询包含[*]
要删除错误,我必须将字段名称更改为sth。像这样:
@Entity
public class ShopCommentRating {
@NotNull
private Boolean commentLike;
}
'小写驼峰案'名称
答案 1 :(得分:0)
对于42001-197,您还可以检查Oracle分析函数和H2版本,该版本必须从1.4.198开始,尤其是对于ROW_NUMBER OVER PARTITION。