Click here to Skip to main content
15,915,509 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have follwing records
Reference |ID|Name
Akash |1 |Dan
avi |1 |Dan


so i need output like

Reference |ID|Name
Akash,avi |1 |Dan


In ms sql server 2008

What I have tried:

i have tried stuff and substring function but its not working for me
Posted
Updated 17-Jun-16 3:42am
Comments
Tomas Takac 17-Jun-16 7:56am    
Google[^] is your friend.

1 solution

This is a bad idea, you are not meant to merge records into a column like that which makes queries harder and kills any kind of optimizations the database engine can do.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900