• rac.coons (6/28/2013)


    Here's a very quick and easy way to display all characters that I did not see here.

    select convert(xml,'<txt>' + @txt + '</txt>')

    In SSMS, it returns a link that opens a new tab with all of the text.

    You posted that before the others and I have to give credit where credit is due. Add the TYPE clause to de-entitize special characters and the special "AS" and it's a beautiful thing. Well done. Thanks for stopping by and thank you VERY much for the tip.

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