Avatar of Merion
Merion
Flag for United States of America

asked on 

Converting XML to varchar(max)

I need to store my xml out put in an varchar(max) field.
when i try to convert my xml ("for xml explicit") i am getting the following error.
any help will be greatly appreciated.

Error:

"The FOR XML clause is invalid in views, inline functions, derived tables, and subqueries when they contain a set operator. To work around, wrap the SELECT containing a set operator using derived table syntax and apply FOR XML on top of it."
Microsoft SQL ServerMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
Anthony Perkins

8/22/2022 - Mon