I have a requirement in which I have to merge multiple rows as a single string of a single column A. Ex: If A returns 4 rows what I want is 'row1,row2,row3,row4'. Problem is these rows will be accepted by a single procedure parameter and I wonder whether this merging is possible on that parameter or not.
Asked
Active
Viewed 28 times
0
-
What version of SQL? – Shawn Apr 26 '18 at 17:17
-
Follow the duplicate link to see options for doing this. When you have tried a query, if it doesn't work then drop a comment here or open a new question. – Tim Biegeleisen Apr 26 '18 at 17:18
-
@TimBiegeleisen, actually smells like an XY problem. I think the real solution here is `Table Valued Parameters`. Unless the receiving procedure can't be modified. – Tab Alleman Apr 26 '18 at 18:56