0
点赞
收藏
分享

微信扫一扫

多个if查询及case when 语句

concat( if(t2.`flow_flag`=1 and t1.`field_source`= '06','支付宝账号1',''),
if(t2.`flow_flag`=0 and t1.`field_source`= '06','支付宝账号2',''),
if(t2.`flow_flag`=1 and t1.`field_source`= '07','微信账号1',''),
if(t2.`flow_flag`=0 and t1.`field_source`= '07','微信账号2','')) as '账号',case `field_source` 
when 1 then '支付宝'
when 2 then '微信'
end as '支付来源',

举报

相关推荐

0 条评论