Hibernate 带有大小写的HQL select语句

Hibernate 带有大小写的HQL select语句,hibernate,hql,Hibernate,Hql,是否可以在另一个“Case”中添加“Case”语句?这不是我的工作方式 “case when(cia.nif不为空,然后是cia.nif else case when(d.owner,然后是c2.cif else“”)作为cia\u externa\u nif,”+ 有人能帮我吗?谢谢 下面是一个例子 select order_id, max(timestamp), case when max(case when action = 'D' then timestamp e

是否可以在另一个“Case”中添加“Case”语句?这不是我的工作方式

“case when(cia.nif不为空,然后是cia.nif else case when(d.owner,然后是c2.cif else“”)作为cia\u externa\u nif,”+

有人能帮我吗?谢谢

下面是一个例子

select
    order_id,
    max(timestamp),
    case when max(case when action = 'D' then timestamp end) is not null then 1 else 0 end myAlias
from ORDER
group by order_id

但是,如果在您拥有的else 0上,您想要else和另一个where子句,比如“then 1 else when(x=“A”then action=“E”,该怎么办