sqlserver 查询时的CASE WHEN学习记录
select SUM() as '任务数',
RPATask_State as id,
case RPATask_State
when then
'已接收'
when then
'进行中--其他客户端抢占未运行'
when then
'已完成'
when then
'异常'
else
'其他'
end
from RPATask
where RPATask_TaskID LIKE '13789829365%'
group by RPATask_State