This question already has an answer here:
Multiple rows to one comma-separated value [duplicate] 1 Answer
I want to create a table valued function in SQL Server, which I want to return data in comma separated values.
For example table: tbl
ID | Value
---+-------
1 | 100
1 | 200
1 | 300
2 | 600
2 | 700
Now when I execute the query in SQL Server, I want table to be like:
ID | Value
---+-------
1 | 100,200,300
2 | 600,700