February 17, 2021 at 2:20 pm
This may be a question specifically for Jeff Moden, but does anyone know what license governs the DelimitedSplit8K function?
I ask because I may want to adapt it to fit some code I'm writing, and I just want to make sure I stay within the lines. I haven't been able find any mention of the sharing/adapting/improving limitations.
Thanks in advance. And apologies if I just missed it somewhere.
Mike
Mike Scalise, PMP
https://www.michaelscalise.com
February 17, 2021 at 6:40 pm
You're a good and thoughtful man, Mike. Thank you for asking.
I've always said that DelimitedSplit8k (and DelimitedSplitN4k) was created by the community and I just happen to be the prime caretaker of it. I won't lay claim to it in the form of Copy Right or anything else of such a nature. I can't speak for the community but my opinion is that it was developed over time with the help of the community "by the community and for the community" and anyone can use it or modify it to suit their needs.
Also, be sure to see the seriously great improvement that Eirikur Eiriksson made to the function using LEAD (which came out in 2012) in his 2014 article below. I tested it for Eirikur (at his request for a peer review before he published it) and his findings are correct... replacing the CHARINDEX() in the original with LEAD makes the code twice as fast and now comes even closer to CLR speeds.
https://www.sqlservercentral.com/articles/reaping-the-benefits-of-the-window-functions-in-t-sql-2
As a bit of a sidebar, once you've modified it for your own needs, you should consider writing an article about your modification and why you needed it. Articles about such adaptations are always useful to the community at large and also provide people with alternative thought processes they may not have considered before.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 17, 2021 at 6:45 pm
Thats a really good question. I think the answer is that unless specified otherwise, the copyright is owned by the publisher and you should refrain from using it. On the other hand, I've always assumed that the method of splitting a string using a sequence of integers is not patentable so I've always felt free to use one that I wrote to work with SQL 2000 and have pretty much used that version, but it isn't written as a function or ever used as such.
Unfortunately, the version I wrote is company confidential LOL
February 18, 2021 at 5:10 pm
Jeff,
Thank you for the response and for the clarification. Also, I didn't realize that Eirikur had taken it even further! If I end up incorporating it into my code, I'll definitely blog about it.
Again, thank you.
Mike
Mike Scalise, PMP
https://www.michaelscalise.com
March 2, 2021 at 9:21 am
I agree entirely, but this blog was intended to focus purely on the relative performance of XML Lists, because the comments about their poor performance when used as parameters had bothered me for a while. It got more interesting after wBob's contribution that showed that XML attribute lists were, by contrast, pretty handy. I used other methods purely for comparison of performance. I'd hate to trespass on the stamping ground of experts like Jeff and Erland.
March 2, 2021 at 6:06 pm
I agree entirely, but this blog was intended to focus purely on the relative performance of XML Lists, because the comments about their poor performance when used as parameters had bothered me for a while. It got more interesting after wBob's contribution that showed that XML attribute lists were, by contrast, pretty handy. I used other methods purely for comparison of performance. I'd hate to trespass on the stamping ground of experts like Jeff and Erland.
Nope... not trespassing at all. Welcome to "the club"!
I'll be the first to agree that if you pass XML as a parameter that needs to be split, it's not only handy but fast, a well. The problem comes in when people try to convert a CSV (or other delimited string) to XML so that they can "split" it using XML. Then, performance falls apart because of the concatenation, replacement of delimiters, and expansion of the string.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply