ORA-00905:缺少关键字

时间:2015-06-09 14:07:02

标签: sql oracle

我正面临一条错误消息:

  

ORA-00905:缺少关键字

我猜它与下面列出的case表达式有关。有什么建议可以解决吗?

这是代码:

case when M1.M_GL_CAT_T24 <= 50000 then M1.M_GL_CAT_T24 as CATEGORY1 else 0 end,
case when M1.M_GL_CAT_T24 <= 50000 then M1.M_GL_ACC_NAM as NAME else ''  end,
case when M1.M_GL_CAT_T24 > 50000 then M1.M_GL_CAT_T24 as PL_CATEGORY  else 0 end,
case when M1.M_GL_CAT_T24 <= 50000 then M1.M_GL_ACC_NAM as PLCATE_NAME else '' end,

2 个答案:

答案 0 :(得分:2)

case when M1.M_GL_CAT_T24 <= 50000 then M1.M_GL_CAT_T24 else 0 end as CATEGORY1,
case when M1.M_GL_CAT_T24 <= 50000 then M1.M_GL_ACC_NAM else ''  end as NAME,
case when M1.M_GL_CAT_T24 > 50000 then M1.M_GL_CAT_T24  else 0 end as PL_CATEGORY,
case when M1.M_GL_CAT_T24 <= 50000 then M1.M_GL_ACC_NAM else '' end as PLCATE_NAME,

答案 1 :(得分:2)

case when M1.M_GL_CAT_T24 <= 50000 then M1.M_GL_CAT_T24 else 0 end as CATEGORY1 ,
case when M1.M_GL_CAT_T24 <= 50000 then M1.M_GL_ACC_NAM else ''  end as NAME ,
case when M1.M_GL_CAT_T24 > 50000 then M1.M_GL_CAT_T24 else 0 end as PL_CATEGORY  ,
case when M1.M_GL_CAT_T24 <= 50000 then M1.M_GL_ACC_NAM  else '' end as PLCATE_NAME,