removing HTML tags in SQL Server 2005 or 2008

HI, I have few records in my table in the below format.

Does the operator wish to apply for the <a href="../public/glossary.htm#TEST" target="_new" id="_glossary">TEST</a> scheme?

I need the above record to appear as  below -

Does the operator wish to apply for the TEST scheme?

Can anyone  give me the TSQL Code to remove this html code
as I just need to get the text part of it.

Many Thanks
Who is Participating?
arnoldConnect With a Mentor Commented:

Alternatively, using/setting up an ASP/ASP.Net page that will query the table/field strip out the HTML and update the entry.

If you have perl on your system you might be able to use it to do the same task.

MeLindaJohnsonConnect With a Mentor Commented:
select replace(replace(FIELDNAME,'<a href="../public/glossary.htm#TEST" target="_new" id="_glossary">',''),'</a>','') from TABLENAME
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.