错误:请求 Oracle、hibernate

发布于 2024-09-11 13:45:46 字数 798 浏览 6 评论 0原文

出现错误

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

毅然前行 2024-09-18 13:45:46

您的表有一列名为“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文