• pricejt (11/18/2012)


    I have an xml string and need to manipulate it within sql.

    ...

    T-SQL is not the language for XML manipulation. It can parse it and it can create it, but not transform it.

    This task is for XSLT.

    If you still want to do so in T-SQL you have two choices:

    1. Parse it into table then create a new one (stupid option)

    or

    2. Create CLR function which will consume your XML, relevant XSLT and apply it (preferred option)

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]