Solved

removing HTML tags in SQL Server 2005 or 2008

Posted on 2010-08-17
2
433 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 77

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

914 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

18 Experts available now in Live!

Get 1:1 Help Now