Home Forums SQL Server 2005 T-SQL (SS2K5) illegal xml character - how to find the offending row RE: illegal xml character - how to find the offending row

  • Your table has multiple rows of nvarchar(max), and one or more of those have an illegal XML character in them. Correct?

    Can you step through the table, assign that column to an XML-typed variable, and see which row(s) fail? A cursor with a Try Catch nested in it should be able to do that pretty rapidly, unless it's a LOT of data.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon