過濾NULL值我有以下查詢:在CASE語句
select
CASE WHEN rt.ROLE_TYPE_CD = 'SA' THEN ap.APPL_CD + ' ' + rt.ROLE_TYPE_CD
WHEN ap.APPL_SID = 1 THEN rt.ROLE_TYPE_CD
ELSE NULL
END as dropdownName,
rt.role_type_sid as dropdownID,
rt.actv_ind as active,
'Application Role' as dropdownCatagory
from cdms_role_type rt
INNER JOIN CDMS_APPLICATION ap
ON rt.APPL_SID = ap.APPL_SID
where role_type_cd != 'All Role Types'
**AND (CASE WHEN rt.ROLE_TYPE_CD = 'SA' THEN ap.APPL_CD + ' ' + rt.ROLE_TYPE_CD
WHEN ap.APPL_SID = 1 THEN rt.ROLE_TYPE_CD END) IS NOT NULL**
我想避免的最後一個AND條件,仍然想擺脫NULL值的下拉column.How我去嗎?請幫助
不匹配的情況進行空 - 不知道+1 – VoodooChild