jdr0606
asked on
Find special characters using tSQL
I have a table with parts and part descriptions.
I need to find any part that has a special character in in. Special characters that I'm most concerned with are % , : ; " ' ? / \
What is the best way to find those parts?
Thanks
I need to find any part that has a special character in in. Special characters that I'm most concerned with are % , : ; " ' ? / \
What is the best way to find those parts?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect!
Thanks
Thanks
ASKER
One more question, how would I look for a single quote i.e. '
CHARINDEX( ''', [Description]) 'Has ''
ASKER
Unfortunately that doesn't work
Msg 102, Level 15, State 1, Line 28
Incorrect syntax near 'Has'.
Msg 102, Level 15, State 1, Line 28
Incorrect syntax near 'Has'.
SELECT ColumnName FROM TableName WHERE ColumnName like '%[^a-Z0-9]%'
Character which are in the set a-Z and 0-9