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;
我错过了关键字错误:
答案 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;