views:

1596

answers:

1
A: 

I believe your forgot the table you want to query.

     select 
       case 
         when min(start_day_plan) is not NULL then min(start_day_plan) 
         else to_date((min(insertDate)) - cast('1 month' as interval),'yyyy-MM-dd' ) 
       end
     from MyTable
KLE
ooppss... i just forgot to paste it here... :)
side_dish
do i need to to import classes for this or case is not supported in hql?
side_dish
**case** is perfectly supported in hql (if the underlying database supports it).
KLE
but what's this No data type for node: org.hibernate.hql.ast.tree.CaseNode all about? what is wrong with the code?
side_dish
@side_dish I don't know for sure. I suggest uou try to make the simplest request to work, then add complexity little by little, until you encouter the error. Then, either you find the correction, or you ask us a more focused question with the simplest case that is wrong, stating what works and what doesn't ...
KLE
okay, noted. thanks
side_dish