--===============================================================
IF TYPE_ID('udt_Single_Column_String') IS NOT NULL
BEGIN
    DROP TYPE udt_Single_Column_String;
END
GO

CREATE TYPE udt_Single_Column_String AS TABLE
(
    StringToJoin NVARCHAR(2000)
)
GO

--===============================================================
IF OBJECT_ID('udf_Concatenate_Column', 'FN') IS NOT NULL
BEGIN
    DROP FUNCTION dbo.udf_Concatenate_Column;
END
GO

CREATE FUNCTION udf_Concatenate_Column
(
    @tblToProcess dbo.udt_Single_Column_String READONLY,
    @sContatenateSymbol NVARCHAR(6)
)
RETURNS NVARCHAR(MAX)
AS
BEGIN
    DECLARE @sTmpCondition NVARCHAR(2000) = '', @sResult NVARCHAR(MAX) = '';

    DECLARE concatenating_cursor CURSOR FOR
        SELECT StringToJoin
            FROM @tblToProcess;

    OPEN concatenating_cursor
    FETCH NEXT FROM concatenating_cursor
    INTO @sTmpCondition;
        WHILE @@FETCH_STATUS = 0
        BEGIN
            SET @sResult = @sResult + CASE WHEN LEN(@sResult) > 0 THEN @sContatenateSymbol ELSE '' END + @sTmpCondition;

            FETCH NEXT FROM concatenating_cursor
            INTO @sTmpCondition;
        END
    CLOSE concatenating_cursor;
    DEALLOCATE concatenating_cursor;

    RETURN @sResult;
END
GO