• lexcerm - Thursday, July 19, 2018 2:11 AM

    Hi Jeff,

    Thank you for replying.  I have actually researched some of your excellent work, but haven't been able to adapt this for my situation.

    The string I am wanting to split will always have a semi-colon separator, so something like this:-
    AA;BB;CC;DD;EE;FF;GG etc. 
    This string could potentially be split up to, say, 100 times or beyond.

    As I am working with SQL 2012, I do not have the luxury of being able to use the new 2016 STRING_SPLIT function.

    Thanks again! 🙂

    Did Steve's good answer help you or are you still stuck with using an XML splitter?

    --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)