MGM MGM - 1 year ago 101
SQL Question

ASCII (?) Special characters issue

I have a contact table where it stores names of the contact persons. So our research team copies the names from websites and pastes it into application, while copying we got some special characters got stored into database. Check below examples which will reflect as "?"(ASCII code=63) while extracted to text file. Examples of contact Last names are listed as follows.

EX: 1) Sheffield
2) Griffin-Smith
3) Lhoёst

Is there a way to query list of all special characters available with ASCII code as 63 in the "Last_name" column of my contact table so that I could figure out and send them to researchers to update the correct names.

Thanks in advance!

Answer Source

If you want to find all entries which contain non ASCII Characters you can do the following:

select * from TheTable where Last_name != Cast(Last_name AS VARCHAR(1000)) 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download