declare @Samples as Table ( Val NVarChar(32) );
insert into @Samples ( Val ) values
( '[' ), ( ']' ), ( '"' ),
( 'a\b/c:d;e|f=g,h+i*j?k<l>m' ),
( 'Vogon poetry.' );
-- Undesirable characters: "\/[]:;|=,+*?<>
select Val, case when Val like N'%["\/[↕]:;|=,+*?<>]%' escape N'↕' then 'Fail' else 'Pass' end as Status
from @Samples;
2条答案
按热度按时间62lalag41#
类似于:
应查找工作异常行
vkc1a9a22#
您可以使用 * 转义字符 * 将所有这些内容合并到一个
like
中:dbfiddle。