• ChrisM@Work (3/14/2013)


    Steven Willis (3/13/2013)


    DelimitedSplit8K is far from overkill. Why use a hammer when you have a nail gun?

    +1 😉

    Well, if you only have a couple dozen nails to drive and you don't have the correct size in a strip or coil that fits your nail gun and your air compressor is in the garage buried under six lawn chairs, two coolers, a weed eater, and a couple of pairs of roller blades and you'd need to borrow or buy an additional 50' of air hose to reach your work area, the hammer may be the better choice!

    The OP mentioned that he only needed to do a one-time job on about 100,000 rows. It seems much more expedient to write the CHARINDEX code and hit "execute" than to create the function and then write a query that calls it.

    On the other hand, if I didn't already HAVE the nail gun and compressor, a project that involves driving a few dozen nails would make a pretty good justification for acquiring them! 😀 The OP might be well-served in the future by having the DelimitedSplit8K function ready to go when he is tasked with a tougher string-split operation, i.e., the time it would take to create it now will likely pay off in the future if there is much string-splitting to be done in his shop..

    Jason Wolfkill