select distinct a.billno,a.stepname,a.dealname,
CASE a.dealremark
WHEN '同意' THEN 'NULL'
ELSE dealremark END dealremark,
CASE a.dealresult
WHEN '1' THEN '通过'
WHEN '2' THEN '不通过'
ELSE '处理中' END dealresult,
b.statusname,a.starttime,a.endtime,a.dealno,c.stepid,a.processid,e.satisfaction,e.evaluate
from sys_flow_processes a,SYS_FLOW_BILL e,tb_sys_billstatus b,sys_flow_step c,SYS_FLOW_BUS d
where a.flowcode=d.flowcode and d.flowid=c.flowid and a.stepname=c.stepname AND b.billstatus=a.flowstatus
and a.BILLNO=e.billno
and a.billno='20191200077'
order by a.dealno desc;
最后
以上就是魁梧寒风最近收集整理的关于sqlserver中case when使用的全部内容,更多相关sqlserver中case内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复