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 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 field name
* the field with the invalid character
In this example I was not sure how to get an invalid character to show. Just pretend that Smith and Henry had invalid characters.
Id |FieldName |InvalidCharacter | --------|-------------|-------------------| 25 |LastName |Smith | 56 |FirstName |Henry | 100 |Address1 |123 Some street |
Invalid characters would be outside the range of SPACE (Dec 32) through ~ (Dec 127)
Thanks in advance