How can I concatenate a specific attribute of all elements together using SQL XQuery?
I have a table like this:
InvoiceId Details
--------- -----------------------------------------------------------------
1001 <Stuff Id="101" p="3" q="5"/><Stuff Id="102" q="4"/><Stuff Id="103"/>
1002 <Stuff Id="201" /><Stuff Id="202" q="2"/>
and need this result =>
InvoiceId IdDetails
--------- ---------------------
1001 101,102,103
1002 201,202