This UDF will parse a string delimited by the character you specify and return the value in the n-th position you requested.
Example:
select dbo.fn_parse('this string', ' ', 1) --> 'this'
select dbo.fn_parse('this string', ' ', 2) --> 'string'
select dbo.fn_parse('this string', ' ', 3) --> NULL
select dbo.fn_parse('this string', ' ', 2) --> ''
Creating a PDF from a Stored Procedure in SQL Server
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.
2019-09-20 (first published: 2003-08-26)
73,111 reads