views:

17

answers:

1

hello, 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
+1  A: 

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.

Tony Andrews
lol I blind thx
Mercer