34,588
社区成员
发帖
与我相关
我的任务
分享
select * from tb
where
auit=0 and
(suppliers is not null or suppliers1 is not null or suppliers2 is not null )
只要出现就查询的到---还是这个意思啊?
包含?
SELECT * FROM @a
WHERE audit=0 AND
CASE WHEN CHARINDEX(S,S1)>0 AND CHARINDEX(S,S2)>0 THEN 1 ELSE 0 END+
CASE WHEN CHARINDEX(S1,S)>0 AND CHARINDEX(S1,S2)>0 THEN 1 ELSE 0 END+
CASE WHEN CHARINDEX(S2,S1)>0 AND CHARINDEX(S2,S)>0 THEN 1 ELSE 0 END
>0
select
*
from
tb
where
auit = 0 and suppliers = suppliers1 and suppliers = suppliers2
--?
select * from tb where auit=0 and Suppliers=Suppliers1 and Suppliers1=Suppliers2