How can rows with non-ASCII characters be returned using SQL Server?
If you can show how to do it for one column would be great.
I am doing something like this now, but it is not working
select *
from Staging.APARMRE1 as ar
where ar.Line like '%[^!-~ ]%'
For extra credit, if it can span all varchar
columns in a table, that would be outstanding! In this solution, it would be nice to return three columns:
- The identity field for that record. (This will allow the whole record to be reviewed with another query.)
- The column name
- The text with the invalid character
Id | FieldName | InvalidText |
----+-----------+-------------------+
25 | LastName | Solís |
56 | FirstName | Fran?ois |
100 | Address1 | 123 ümlaut street |
Invalid characters would be any outside the range of SPACE (3210) through ~
(12710)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…