Elegabalus
Programmer
I'm using the split function mentioned in the FAQ ( and it's been working great for me. I pass in a delimited string, and it converts it to a table format.
However, recently I needed to use it to pass in a very long string, and it has stopped working correctly.
If I use that function with the following code, it will return a table with 4000 rows (instead of the 1,000,000 rows expected).
I have gone into the function code and changed the @InputText field to Varchar(MAX), as well as changing the Value field to Varchar(MAX), but when I do that, it simply returns a table with 4001 rows.
Anyone with an idea how to fix this? Or what the problem is?
However, recently I needed to use it to pass in a very long string, and it has stopped working correctly.
If I use that function with the following code, it will return a table with 4000 rows (instead of the 1,000,000 rows expected).
Code:
DECLARE @test varchar(max)
SELECT @test = replicate('t|', 1000000)
SELECT Value
FROM dbo.Split(@test, '|')
I have gone into the function code and changed the @InputText field to Varchar(MAX), as well as changing the Value field to Varchar(MAX), but when I do that, it simply returns a table with 4001 rows.
Anyone with an idea how to fix this? Or what the problem is?