I looked at Jeff Moden's function and I don't know that I like being limited to 8K for that function.
On the parameters, that's the way I designed it:
Create Function dbo.Split(@S As VarChar(Max), @Delimiter Char(2) = '', @ByteCount Int = 0)
Returns @SplitTable Table
(
SplitID Int Identity(1,1),
SplitText VarChar(Max)
)
AS
For whatever reason, I have never run into a situation where SQL evaluating a space into a zero-length string ever mattered.
I hope I don't end up having to run a replace, as Bitbucket suggested, but perhaps that's the only way out for this situation.
Thanks,
Chris
Learning something new on every visit to SSC. Hoping to pass it on to someone else.