DECLARE @Names VARCHAR(8000)
SELECT @Names = COALESCE(@Names + ',', '') + itemRef FROM TableName Where activityRef = '123123'
Select @Names
SELECT @Names = COALESCE(@Names + ',', '') + itemRef FROM TableName Where activityRef = '123123'
Select @Names
No comments:
Post a Comment