来自BO变量的case语句

时间:2015-09-29 15:38:27

标签: sql sql-server-2008 case

我在BO中有一个变量来计算任何超过240英镑的修复

这称为 Sum diff

=Sum([REP Invoice Cost Amount])-([REP Original Estimated Cost Amount])ForEach ([REP Invoice Cost Amount];[REP Original Estimated Cost Amount])

然后是另一个添加另一个计算的变量

=If[Sum diff]>=240 Then "Y" Else "N"

案例陈述与此相当的是什么?

提前致谢

1 个答案:

答案 0 :(得分:0)

IN SQL case

CASE 
   WHEN [Sum diff] >= 240 THEN 'Y'
   ELSE 'N'
END as fieldName