• Always post table defintion along with test data to get faster resultsl.people here steal their time to help others , sometimes they dont have time to frame everything here.please see the link below my signature. 🙂

    hope this helps you

    declare @t table

    (id int , chr char(1))

    insert into @t

    select 1, 'a' union

    select 1, 'h' union

    select 1, 'y' union

    select 4, 'k' union

    select 4, 'f'

    select * from @t

    select distinct id, STUFF((select '' + cast(chr as nvarchar(20)) from @t where id= t.id FOR XML PATH('')),1,0,'')

    from @t t

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)