DECLARE @RESULT NVARCHAR(MAX); SELECT @RESULT =ISNULL(@RESULT,'') + ISNULL(LookupKey,'')+',' FROM tblCtcLookup WHERE LookupCat='AppSettings' SELECT @RESULT