How to concatenate the result values into a single row?
I created two tables like this.
first table
clientid name
1        test1
2        test2
3        test3
second table
id   clientid
3    1
3    2
3    3
my requirement getting
result
3  test1,test2,test3
My SP....
ALTER PROCEDURE [dbo].[usp_test]-- 3
    @ID INT
AS  
BEGIN
    SELECT CO.id,AR.name FROM dbo.test1 AR
    LEFT OUTER JOIN dbo.test2 CO On AR.clientid=CO.clientid
    WHERE CO.id=@ID
END
Then I am getting result as
id  name
3   test1
3   test2
3   test3
Please modify my sp to get the below format output
id  name
3   test1,test2,test3
 
    