query to concatenate columns if record duplicate
1
vote
3
answers
2833
views
My table has two column that is id and name. I want to do concatenate the columns if the if more than two names are same like:
id name
1 John
2 David
3 Zed
4 John
5 David
6 John
7 David
8 John
9 John
Now I want my output that if name is repeated than the first record will remain as it is and other will be concatenated by id like
Id Name
1 John
2 David
3 Zed
4 4 John
5 5 David
6 6 John
7 7 David
8 8 John
9 9 John
Can anyone please help...Thank you
Asked by Aditya Shrivastava
(155 rep)
Aug 5, 2015, 11:34 AM
Last activity: Jul 16, 2021, 06:11 AM
Last activity: Jul 16, 2021, 06:11 AM