标签:phone The nbsp 分享 结果 代码 one join 条件
==========代码实例,俩个条件判断,如果都不符合走else语句=================
SELECT
TMRP.xm,
TMRP.sj,
TMRP.BGYX,
TCUI.PHONE,
TCUI.MAIL,
CASE
WHEN TCUI.PHONE IS NOT NULL THEN TCUI.PHONE
WHEN TMRP.sj IS NOT NULL THEN TMRP.sj
ELSE ‘‘
END aa,
CASE
WHEN TCUI.MAIL IS NOT NULL THEN TCUI.MAIL
WHEN TMRP.BGYX IS NOT NULL THEN TMRP.BGYX
ELSE ‘‘
END cc
FROM
V_MID_RS_PARTY TMRP
INNER JOIN T_CADRE_USER_INFO TCUI ON TMRP.NUM_ID = TCUI.BASE_INFO_ID
===========查询结果==============
标签:phone The nbsp 分享 结果 代码 one join 条件
原文地址:https://www.cnblogs.com/konglxblog/p/10070417.html