The example code above showed this statement:
SELECT RowData + ''
FROM Groups b
WHERE a.rn = b.rn FOR XML PATH('')
Why is the + '' required? When I remove this then I get an result that looks like XML instead of a concatenated string.
If I Cast Rowdata to a varchar then the + '' is not required.
Thanks for the explanation.