• Quick suggestion, add the .value() method to get the correct output

    😎

    select

    mult1.VisitID

    ,mult1.AbstractID

    ,(select

    Response + ','

    from

    [livedb_daily].[dbo].[AbsProjectsQueriesMultCs] mult2

    where

    mult2.VisitID=mult1.VisitID

    and mult2.AbstractID=mult1.AbstractID

    order by

    mult2.VisitID

    ,mult2.AbstractID

    for xml path (''), TYPE).value('.[1]','NVARCHAR(MAX)') as overall

    from

    [livedb_daily].[dbo].[AbsProjectsQueriesMultCs] mult1

    where

    mult1.VisitID='RA0-20120603025910735'

    and mult1.[Query]='Additional Notes'

    group by

    mult1.VisitID

    ,mult1.AbstractID