62,041
社区成员
发帖
与我相关
我的任务
分享
select t.FaultType from
(select * from Posss_FaultReport where not CheckDate is NULL) as t where t.FaultType ='51' or
t.FaultType like '%|'+ cast(51 as nvarchar(10))+ '%' or t.FaultType like '%'+ cast(51 as nvarchar(10))+ '|%'
还是会出现41|78|79|251|451 不行呀。 没有别的方法了吗?[/quote][/quote]
恩,全写了。 select t.FaultType from
(select * from Posss_FaultReport where not CheckDate is NULL) as t where t.FaultType ='51' or
t.FaultType like '%|'+ cast(51 as nvarchar(10))+ '%' or t.FaultType like '%'+ cast(51 as nvarchar(10))+ '|%' or
t.FaultType like '%|'+ cast(51 as nvarchar(10))+ '|%'
这是查询出的31|43|251|271 select t.FaultType from
(select * from Posss_FaultReport where not CheckDate is NULL) as t where t.FaultType ='51' or
t.FaultType like '%|'+ cast(51 as nvarchar(10))+ '%' or t.FaultType like '%'+ cast(51 as nvarchar(10))+ '|%'
还是会出现41|78|79|251|451 不行呀。 没有别的方法了吗?[/quote] select t.FaultType from
(select * from Posss_FaultReport where not CheckDate is NULL) as t where t.FaultType ='51' or
t.FaultType like '%|'+ cast(51 as nvarchar(10))+ '%' or t.FaultType like '%'+ cast(51 as nvarchar(10))+ '|%'
还是会出现41|78|79|251|451 不行呀。 没有别的方法了吗?