I’m kinda stuck in writing Stored Procedure. Here is the case. I have one table, below is the illustration
| Name | Score |
| A | 10 |
| A | 20 |
| A | 30 |
| B | 20 |
| B | 50 |
And i’m trying to get a result as follows from the Stored Procedure
| Name | Scores |
| A | 10,20,30 |
| B | 20,50 |
Is it possible to get such a result from a SQL Query or Stored Procedure ? How ?
Revised after considering comments:
I recommend reading Rob Farley’s excellent blog post Handling special characters with FOR XML PATH(”). His solution will allow for string concatenation of your grouped ID’s without concern for fields that might have special characters.