SQLTeam.com | Weblogs | Forums

Pivot the rows to columns


#1

Hi,

I have data like below

US
USA
Albama
Dixie

I want the output like this below
US.USA.Albama.Dixie.

Can someone help on this


#2

select c + '.'
from
( select 'US' c union
select 'USA' union
select 'Albama' union
select 'Dixie'
) d
for xml path('')