为什么我会为此查询获取“缺少关键字”?

时间:2012-12-13 11:39:22

标签: oracle

Select A.Smscid,
       A.Delivery_Date,
       A.Type,
       A.End_Delivery,
       A.Volume,
       (Case When A.Type='Transactional' And A.End_Delivery=B.Operator 
             Then (A.Volume*B.Onnet_Trans_Cost)) As "COST",
 From Telco_Success a,operators_cost b;

我错过了关键字错误:

1 个答案:

答案 0 :(得分:5)

未经测试,但您似乎错过了End声明中的Case关键字。此外,您似乎在“COST”之后有一个逗号,这是不需要的。

Select A.Smscid,
       A.Delivery_Date,
       A.Type,
       A.End_Delivery,
       A.Volume,
       (Case When A.Type='Transactional' And A.End_Delivery=B.Operator 
             Then (A.Volume*B.Onnet_Trans_Cost) End) As "COST"
 From Telco_Success a,operators_cost b;