日期:2014-05-18 浏览次数:20456 次
A.FinanceSubjectID LIKE '%,' + CAST(T.FinanceSubjectID AS VARCHAR(50))+ ',%' OR A.FinanceSubjectID LIKE '%,' + CAST(T.FinanceSubjectID AS VARCHAR(50)) OR A.FinanceSubjectID LIKE CAST(T.FinanceSubjectID AS VARCHAR(50))+ ',%' OR A.FinanceSubjectID = CAST(T.FinanceSubjectID AS VARCHAR(50)) OR A.FinanceSubjectID IS NULL
where A.FinanceSubjectID IS NULL or ','+A.FinanceSubjectID+',' like '%,' + CAST(T.FinanceSubjectID AS VARCHAR(50))+ ',%'
------解决方案--------------------
++
where ','+isnull(A.FinanceSubjectID,T.FinanceSubjectID)+',' LIKE '%,' + CAST(T.FinanceSubjectID AS VARCHAR(50))+ ',%'
------解决方案--------------------
where
CHARINDEX(A.FinanceSubjectID,CAST(T.FinanceSubjectID AS VARCHAR(50)))>0 or OR A.FinanceSubjectID IS NULL