Home Forums SQL Server 2019 SQL Server 2019 - Development DBA Challenge! I've spent 4 hours trying to figure how to extract data from XML in a hierarchical form. RE: DBA Challenge! I've spent 4 hours trying to figure how to extract data from XML in a hierarchical form.

  • With no reflection on the OP because he's the poor consumer of this data and not the perpetrator... you just have to wonder what the heck is on people's minds when they build such XML.  It's certainly meant to be hierarchical but they used the XML like a typewriter instead of using the abilities of XML.  A simple numbered list TSV would have been more effective in just about every manner.

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