Search string for invalid characters in SQL

I have several lines that may contain special characters or letters with an accent. I need to detect these lines. I have it as my current comparison

@Str like '%[^a-zA-Z0-9.,& ]%'

This is great for special characters, but not for accented letters. I tried changing the sort.

+4
source share
1 answer

Remove the space after 9 and add sorting. I also think that the column datatypeshould be Nvarchar.

@str not like '%[^a-zA-Z0-9]%' collate Latin1_General_CI_AS
+2
source

All Articles