• Eirikur Eiriksson (4/19/2015)


    Second solution, which is more efficient than the previous one as it doesn't use the XML concatenation.

    /* Find the group where the search word is closest to the

    delimiter and calculate the length of the extraction

    */

    I don't know if that's true or not (and I will find out) but what a freakin' awesome idea, Eirikur! And, not only does it work in 2K5 but I've got a couple of other ideas for this. Well done!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)