I'm using SQL Server 2008 Management Studio and trying to select from a sql table that has an invalid XML character in it.
If I just try to select * from the table I get:
An error occurred while executing batch. Error message is: '(square box)', hexadecimal value 0x19, is an invalid character.
I've tried to run a select replace(DataXML, char(25), ') from the table as suggested in this thread:
and I get the error message:
Argument data type xml is invalid for argument 1 of replace function.
Converting the column type in the table doesn't work. Cast doesn't work. Everything I've tried gives an error.
I just want to get rid of the invalid character and take a look at what's inside the XML so I can try to prevent this from happening again.
Anyone have any ideas?
View Complete Post