将IIf(VW_GE_ALL_YEARQRY.DEP="AG","AG","OT") AS DEPT转换为 Oracle 时遇到问题
Select
VW_GE_ALL_YEARQRY.year,
VW_GE_ALL_YEARQRY.LOC,
VW_GE_ALL_YEARQRY.CAT,
VW_GE_ALL_YEARQRY.TY,
(case when VW_GE_ALL_YEARQRY.DEP = 'AG' then 'AG' else 'OT' end) as DEPT,
VW_GE_ALL_YEARQRY.SRCE,
Sum(VW_GE_ALL_YEARQRY.EXPEND * 0.001) As EXP
From
VW_GE_ALL_YEARQRY
GROUP BY VW_GE_ALL_YEARQRY.year, VW_GE_ALL_YEARQRY.LOC, VW_GE_ALL_YEARQRY.CAT, VW_GE_ALL_YEARQRY.TY, (case when VW_GE_ALL_YEARQRY.DEP = 'AG' then 'AG' else 'OT' end) as DEPT, VW_GE_ALL_YEARQRY.SRCE
HAVING (((Sum(VW_GE_ALL_YEARQRY.EXPEND * 0.001)))<>0);
查询告诉我我有一个错误,此时似乎微不足道
Error at Command Line:11 Column:169
Error report:
SQL Error: ORA-00933: SQL command not properly ended
00933. 00000 - "SQL command not properly ended"
*Cause:
*Action: