Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
ALTER FUNCTION [dbo].[Assemble_Business_Comments] (@Apps_Cat_ID int) RETURNS varchar(8000) AS BEGIN DECLARE @Employee_Name varchar(100) DECLARE @Business_Comment varchar(8000) DECLARE @Business_Comments varchar(8000) DECLARE BusinessCommentCursor CURSOR READ_ONLY FOR SELECT Tbl_Survey_Business_Respondents.Respondent_Comment, Tbl_Client_Employees.Employee_Name FROM Tbl_Survey_Business_Respondents INNER JOIN Tbl_Client_Employees ON Tbl_Survey_Business_Respondents.Lookup_To_Tbl_Client_Employees_For_Business_Respondent = Tbl_Client_Employees.ID WHERE (Tbl_Survey_Business_Respondents.Apps_Cat_ID = @Apps_Cat_ID) OPEN BusinessCommentCursor FETCH NEXT FROM BusinessCommentCursor INTO @Business_Comment, @Employee_Name WHILE @@FETCH_STATUS = 0 BEGIN IF @Business_Comment is not null SET @Business_Comments = @Business_Comments + CHAR(13) + CHAR(10) + CHAR(13) + CHAR(10) + @Employee_Name SET @Business_Comments = @Business_Comments + CHAR(13) + CHAR(10) + @Business_Comment FETCH NEXT FROM BusinessCommentCursor INTO @Business_Comment, @Employee_Name END CLOSE BusinessCommentCursor DEALLOCATE BusinessCommentCursor IF @Business_Comment is null SET @Business_Comments = N'None provided' RETURN (@Business_Comments) END
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.