table :
value
- v1
- v2
Now , I need to apply concat function on value col
concat(v1 , ' ' , v2)
like this.
I have used concat()
on two or more col values but not on rows of one column.
How should I do it?
table :
value
- v1
- v2
Now , I need to apply concat function on value col
concat(v1 , ' ' , v2)
like this.
I have used concat()
on two or more col values but not on rows of one column.
How should I do it?
You may use STUFF
for your solution.
select stuff( (select ',' + column from table for xml path('')), 1,1,'')