Solved

removing HTML tags in SQL Server 2005 or 2008

Posted on 2010-08-17
2
424 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:gvamsimba
2 Comments
 
LVL 76

Accepted Solution

by:
arnold earned 250 total points
ID: 33453739
http://www.codeproject.com/KB/string/SqlRegEx.aspx

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.

0
 
LVL 4

Assisted Solution

by:MeLindaJohnson
MeLindaJohnson earned 250 total points
ID: 33457013
select replace(replace(FIELDNAME,'<a href="../public/glossary.htm#TEST" target="_new" id="_glossary">',''),'</a>','') from TABLENAME
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now