I have query that results in a long string of XML. I'm trying to save that xml to the a text field of a table. I get the error 'incorrect syntax near xml'.
I've since learned that you can't use the update command with a text field and am in the process of designing a cursor which will use the updatetext function to update the field.
However, Before doing this I did a little test where I changed the field type to varchar(8000). I still get the same error.
The query looks like this...
Set xmlField = (Select * From Clients For XML Auto, Elements)
1) Why does the above not work when xmlField is varchar(8000)
2) Will my idea to create a cursor and use updatetext work?