• Use XML FOR PATH method (it most likely will give you the best performance for T-SQL implementation):

    declare @Table1 table (EmailAddress varchar(20), Msg varchar(20))

    insert @Table1

    select 'email1','blue'

    union select 'email2','black'

    union select 'email1','white'

    union select 'email1','orange'

    union select 'email4','red'

    select e.EmailAddress as Email

    ,stuff((select ',' + t.Msg

    from @Table1 t where t.EmailAddress = e.EmailAddress

    for xml path('')),1,1,'') as MessageBody

    from @Table1 e

    group by e.EmailAddress

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]