Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have a delima, and i am not really sure if this possible. But i have a table like lets say

age | type | name | dose
1 medicine x 1ml
2 vaccine y 2ml
3 water z 3ml
1 vaccine a 4ml
2 medicine e 5ml

i want to be able to return this as one row with the data from data1 in one column separated by commas.

so the result would be

1 Column
age type name dose
1 medi,vaccine x,a 1ml,4ml

how to use for xmlpath()
can anyone help me with this.

Thank you,
Posted
Updated 22-Mar-12 1:38am
v3

read this[^] article.
 
Share this answer
 
use Stuff function for column values.

Regards
 
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