My Data is structured like this:
and I'm trying to use STUFF/FOR XML PATH to concatenate fields.
If I use the examples that I find online I can get the following result:
But I wondered if the following is possible:
I am currently achieving this by calling FOR XML PATH twice, first to concatenate Header3:
and then again to get the desired result.
Is there a way to do it without calling XML PATH twice?
Are you looking for something like
Returns:
Demo