Hibernate query throwing ERROR:expecting "end", found '+' Unexpected token: end
Hibernate query throwing ERROR:expecting "end", found '+' Unexpected token: end
我有以下查询但它抛出以下错误:
FROM Tbloans WHERE paidamt - (case when due=lastdue then dueamt else dueamt+nxtduedt end)>1
它给我这样的错误:
expecting "end", found '+' Unexpected token: end
提前致谢
case
& where
不能一起使用你可以使用如下..
WHERE (due = lastdue and paidamt - dueamt > 1)
OR (due <> lastdue and paidamt - (dueamt + nxtduedt) > 1)
我有以下查询但它抛出以下错误:
FROM Tbloans WHERE paidamt - (case when due=lastdue then dueamt else dueamt+nxtduedt end)>1
它给我这样的错误:
expecting "end", found '+' Unexpected token: end
提前致谢
case
& where
不能一起使用你可以使用如下..
WHERE (due = lastdue and paidamt - dueamt > 1)
OR (due <> lastdue and paidamt - (dueamt + nxtduedt) > 1)