日期:2014-05-18 浏览次数:20542 次
CREATE TABLE Table2 ( KK VARCHAR(100) ) INSERT INTO Table2 SELECT 'a@abc.com;b@abc.com;c@abc.com;d@abc.com;' UNION SELECT 'a@abc.comb@abc.com;c@abc.comd@abc.com;' SELECT * FROM Table2 WHERE LEN(KK) - LEN(REPLACE(KK,';','')) <> LEN(KK) - LEN(REPLACE(KK,'@',''))
------解决方案--------------------
select * from tb where patindex('%.com[^;]%',col) > 0