DECLARE @list varchar(8000)
SELECT @list=Cast(MEMBERID as varchar(50))+'-'+MEMBERNAME + ',' + COALESCE(@list,'')
SELECT @list=Cast(MEMBERID as varchar(50))+'-'+MEMBERNAME + ',' + COALESCE(@list,'')
FROM MemberDetail
SELECT LEFT(@list,LEN(@list)-1)
SELECT LEFT(@list,LEN(@list)-1)
No comments:
Post a Comment