gpt4 book ai didi

sql - SQL语句中的语法错误-H2错误42001

转载 作者:行者123 更新时间:2023-12-03 16:27:09 25 4
gpt4 key购买 nike

运行此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语句,但是我一直在摸索墙壁,试图弄清楚该错误是什么。问题是,有人有主意吗?

最佳答案

我遇到过同样的问题:

我的实体看起来像这样:

@Entity
public class ShopCommentRating {

@NotNull
private Boolean like;

}

结果查询包含一个[*]

为了消除错误,我不得不将字段名称更改为sth。像这样:
@Entity
public class ShopCommentRating {

@NotNull
private Boolean commentLike;

}

“小写 Camel 案”名称

关于sql - SQL语句中的语法错误-H2错误42001,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29610500/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com