• Laura_SqlNovice (10/28/2011)


    Guys,

    Guys I have a table with a column that has html text. The column with html text is pretty big datatye varchar(max)... I wanted to check if any of you have any function that I can use to Strip out the HTML tags... I saw couple of version online, but it was running too slow..

    This is the one I used:

    http://cosier.wordpress.com/2008/10/22/tsql-strip-html-function/

    Any suggestion is helpful.

    Thanks,

    Laura

    Strip Out 🙂

    What do you want to do with the characters that remain? Just leave them in the string?

    Also, what about individual lines? If there's a new line in the HTML, do you want a new row in the result set?

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