DECLARE @Names VARCHAR(8000)
SELECT @Names = COALESCE(@Names + ', ', '') + CONVERT(varchar(46), [Code])
FROM [Ecommerce].[dbo].[Store]
where [StoreTypeID] in (22,34)
print @Names