Is there any way to do the following in HQL:
SELECT case when flag = true then SUM(col1) else SUM(col2) FROM myTable
I guess you can (3.6, 4.3) [inline edit] ...for where-clauses:
"Simple" case, case ... when ... then ... else ... end, and "searched" case, case when ... then ... else ... end
case ... when ... then ... else ... end
case when ... then ... else ... end
1.4m articles
1.4m replys
5 comments
57.0k users