The ParseName function is very useful for getting parts out of a string of characters between delimiters. But a limitiation is that you only can get four parts out, and the function only accepts dots as delimiters.
The function I have written below overcomes that limitations, and add a new feature to enable "from left" and "from right" character extraction.
declare @var varchar(200)
select @var = 'a.ab.abc.abcd.abcde'
dbo.fnParseString(4, '.', @var),
dbo.fnParseString(-4, '.', @var)
A short but interesting article, the author has figured out a way to create a PDF from a stored procedure without using a third party library.