We have SQL Server 2005 transactional replication set up, and some of our tables have XML datatype columns. We have run into an issue with the following error in the publication:
Incorrect syntax near 's'. (Source: MSSQLServer, Error number: 102)
Get help: http://help/102
Looking at the distribution database, I was able to extract the offending command, and it turns out that the XML column has a single quote (') embedded in it, and the command that was generated for inserting the row into the subscriber table has bad syntax
because of the single quote (i.e., it is not escaped).
One interesting note is that the single quote happens to also show up in a non-XML column, and the command segment for that column was generated correctly (it was escaped).
Is there a workaround / solution for this?
View Complete Post