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
4

1 回答 1

2

您的表有一个名为“D_ANNEE”的列。它没有一个名为“D_ANNE”的列,这是您在 yoru 查询中使用的。

于 2010-07-27T13:30:13.427 回答