I have a table where the data are like
Data
a
b
c
I need to write a SQL Query to bring the following output
Data
abc
Note:~ The number of characters are not constrained to 3.
I have solved using while loop. But I have to do it using set based approach.So how can I
join those characters? I tried using COALESCE but no luck
Please help me
Edit:
I cannot use any function or CLR. It needs to be entirely in 1 SQL.
FOR XML PATH is a good choice but it is showing some link. Actually I have never used that, so I have commented like this.
How to overcome the link text while using the FOR XML PATH. and how it works?
Any other way apart from FOR XML PATH?
Thanks