I am trying to remove html tags using a function someone helped me with last week, and it works great most of the time, but I am seeing some unexpected results. Can anyone help me troubleshoot this, please?
This is the text I am starting with:
<h2>AutoCAD MEP 2010 Tutorial Series</h2><font size="4"><font size="4"><em>
<p><font size="4"><em>HDR University Accredited (16.75 Professional Development Hours)</em></font></p></em
this is the result I am getting:
AD MEP 2010 Tutorial Seriesm>
ty Accredited (16.75 Professional Development Hours)>
Please note there is a blank row to start with, and the first five letters of 'AutoCAD' were removed, and at the end of the first line of text, it should have stopped with the word 'Series'. I don't know if this has anything to do with line breaks, carriage returns, or anything like that.
Here is an example of one that mostly works. This is the original text:
<h3 style="text-align: center;"><a name="Modeling"></a><img width="243" vspace="0" hspace="0" height="64" border="0" src="http://www.hdr.cadlearning.com/file.php/18/model.gif
" alt="Modeling" title="Modeling" /><br /></h3>
<h3> Getting Organized </h3>
This is the result:
Please note the first blank row.
This is the function that I am using:
DROP FUNCTION IF EXISTS `udf_StripHTML`;
CREATE FUNCTION `udf_StripHTML`(_HTMLText VARCHAR(8000)) RETURNS varchar(8000)
while locate('<',@HTMLText)>0 do
I appreciate any assistance you can provide. Thank you in advance.