id Email
output:
id email
I found the following query some where can you explain it?
SELECT id, Email =
STUFF((SELECT ', ' + Email
FROM comma b
WHERE b.id = a.id
FOR XML PATH('')), 1, 1, '')
FROM comma a
GROUP BY id
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shahriar NikkhahPosted May 7, 2018, 6:59 AM