How do I strip html tags for several rows in my sq开发者_C百科l select query?
I saw this function SQL SERVER – 2005 – UDF – User Defined Function to Strip HTML – Parse HTML – No Regular Expression but it works I think for a single select output where as my select has many output rows.
You should be able to use the function you cited on a multirow result set.
SELECT dbo.udf_StripHTML(yt.YourHTMLColumn)
FROM YourTable yt
if you have a valid xml you can use:
SELECT
CONVERT( XML, TEXT_OR_COLUMN_NAME ).value( '.', 'VARCHAR(MAX)' ) as TextR
FROM [TABLE]
精彩评论