• There is a slight problem with your first IF statement if you truly intend for the delimiter to be "... any weird combination of characters that you think is unique to the source file..."

    The statement would need to be changed to:

    IF right(@EntString,LEN(@Delimiter))<>@Delimiter

    otherwise your delimiter is limited to 1 character