• Ulises Telcontar (12/25/2009)


    MAXRECURSION cannot be used on UDFs. This is limited by the default MAXRECURSION value of 100 as it was mentioned above.

    The WHILE methods are not the best performers either, using a table of numbers is. Find some examples here: http://stackoverflow.com/questions/753582/implementing-and-applying-a-string-split-in-t-sql%5B/quote%5D

    If you take the time to review the entire thread, you'd see that RECURSION was already knocked for being slow as were WHILE loop methods. A Tally table version was posted as an alternative.

    In addition to that an extensive forum thread here on SSC was also cited as well, and deserves mention again, Performance issue with tally solution.

    And a search of SSC will show that this topic has been mentioned several times and several good examples of code have been shown in those threads as well.