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.
"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."