Look up the LIKE operator in Books On Line and pay particular attention to the use of the ESCAPE modifier.
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/581fb289-29f9-412b-869c-18d33a9e93d5.htm
CREATE TABLE #Td(
ClientInfo VARCHAR(50)
)
INSERT INTO #td(ClientInfo)
SELECT 'TEST1 1, 0001' UNION ALL
SELECT 'TEST2,0002' UNION ALL
SELECT 'TEST3!,0003' UNION ALL
SELECT 'TEST4^,0004' UNION ALL
SELECT 'TEST5^, 0005'
select *
from #Td
where ClientInfo like '%[#^ ^a-z^A-Z^0-9^,]%' ESCAPE '#';
DROP TABLE #td
Returned:
TEST1 1, 0001
TEST2,0002
TEST3!,0003
TEST4^,0004
TEST5^, 0005
Note: Since your original statement did not handle the comma in the field I did not modifiy it to do that - leaving that to you to handle.
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please read[/url]
Before posting a performance problem please read[/url]