• This would fail if you have only one item in the @array var without a trailing comma e.g:

    DECLARE @array VARCHAR(max)

    SET @array = '1'

    SELECT item FROM strToTable(@array,',')

    This would break the SUBSTRING statements. The function requires that there is a trailing delimiter e.g:

    DECLARE @array VARCHAR(max)

    SET @array = '1,'

    SELECT item FROM strToTable(@array,',')

    It would be nice if the function could handle a single item in the @array var without a trailing delimiter.

    Myles J