Solved

removing HTML tags in SQL Server 2005 or 2008

Posted on 2010-08-17
2
460 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 78

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 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