Finding Non-standard characters in a SQL Server table
Posted on 2009-04-02
A bug in one of our import processes allowed non-standard characters (like Ö]¡]ÐÉ]¿) to get imported into one of our tables. The characters can appear at the end of a string of standard characters or they can appear in the middle of the string. There may be only 1 non-standard character in the field, or multiple non-standard characters. I'm not really sure which non-standard characters were included, so I can't just search for a particular character. I need to find anything that's not A-Z or 0-9, and not a comma, apostrophe, number sign, bracket, parentheses, or other standard symbol in American English.
I need to find the records that are affected. Is there a query I can run that will detect these non-standard characters? I don't want to replace them yet, just to identify the affected records.