我是靠谱客的博主 魁梧寒风,这篇文章主要介绍sqlserver中case when使用,现在分享给大家,希望可以做个参考。

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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(41)

评论列表共有 0 条评论

立即
投稿
返回
顶部