Declare myCurrsor Cursor Local For selectisnull(First_Name,'') +''+isnull(Last_Name,'') as InvestigatorName from dbo.Investigator where Study_ID =@StudyId open myCurrsor FetchNextfrom myCurrsor into@InvestigatorName While@@Fetch_Status=0 begin if(@count>0) begin select@ResultVar=@ResultVar+', ' end select@ResultVar=@ResultVar+@InvestigatorName FetchNextfrom myCurrsor into@InvestigatorName end