This is a port of the SPLIT function from Perl (or VBScript). It works the same way: pass a string and
a separator, up to 4 characters long (you can change this),
and the function returns a table with the elements.
This version trims leading and trailling spaces of the
elements, just for convenience.
FROM master.dbo.SPLIT('a and b', 'and')
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.