SQL server - how to find Hexadecimal character in a table
How to search hexadecimal characters from a SQL Server table? Actually I tried like below but it is searching all zeroes in the field.
select Email,* from address where CHARINDEX(convert(varchar, Ascii(0x00)), Email) > 0
I had a similar problem where a hexadecimal character was crashing a query. This is what I did to find it.
select Email from address where Email like '%' + CHAR(0x00) +'%'
Now to stop the bad data getting in in the first place...