错误:请求 Oracle、hibernate
出现错误
Hibernate operation: could not execute query; bad SQL grammar
[select tarifs0_.D_ANNE as D1_33_, tarifs0_.D_NZONE as D2_33_,
tarifs0_.D_CTYPE_LOCAL as D3_33_, tarifs0_.D_NTARIF_NORMAL as D4_33_,
tarifs0_.D_NTARIF_REDUIT as D5_33_, tarifs0_.D_NSURFACEMIN as D6_33_
from FE_TARIF_IDF tarifs0_
where tarifs0_.D_ANNE in
(select MAX(exercice1_.D_CEXER)
from FE_EXERCICE_FISCAL exercice1_)];
nested exception is java.sql.SQLException: ORA-00904: "TARIFS0_"."D_ANNE": invalid identifier
[Ljava.lang.StackTraceElement;@853e51
我的休眠请求表
D_ANNEE NUMBER(4,0)
D_NZONE NUMBER(1,0)
D_NTARIF_NORMAL FLOAT
D_CTYPE_LOCAL VARCHAR2(1 BYTE)
D_NTARIF_REDUIT FLOAT
D_NSURFACEMIN FLOAT
i have an error with my hibernate request
Hibernate operation: could not execute query; bad SQL grammar
[select tarifs0_.D_ANNE as D1_33_, tarifs0_.D_NZONE as D2_33_,
tarifs0_.D_CTYPE_LOCAL as D3_33_, tarifs0_.D_NTARIF_NORMAL as D4_33_,
tarifs0_.D_NTARIF_REDUIT as D5_33_, tarifs0_.D_NSURFACEMIN as D6_33_
from FE_TARIF_IDF tarifs0_
where tarifs0_.D_ANNE in
(select MAX(exercice1_.D_CEXER)
from FE_EXERCICE_FISCAL exercice1_)];
nested exception is java.sql.SQLException: ORA-00904: "TARIFS0_"."D_ANNE": invalid identifier
[Ljava.lang.StackTraceElement;@853e51
my table
D_ANNEE NUMBER(4,0)
D_NZONE NUMBER(1,0)
D_NTARIF_NORMAL FLOAT
D_CTYPE_LOCAL VARCHAR2(1 BYTE)
D_NTARIF_REDUIT FLOAT
D_NSURFACEMIN FLOAT
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的表有一列名为“D_ANNEE”。它没有有一个名为“D_ANNE”的列,这是您在 yoru 查询中使用的列。
Your table has a column called "D_ANNEE". It does not have a column called "D_ANNE", which is what you have used in yoru query.