Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Dodgy HTML data help

Author  Topic 

WelshPunk
Yak Posting Veteran

67 Posts

Posted - 2009-03-05 : 01:58:42
Hello clever ones... I have a field in a table that over a period of time a user has cut and pasted data into (including the HTML!) Does anyone now of a routine that will clear out the html and leave the non html. Here is a sample...

<TABLE cellSpacing=1 cellPadding=0 width='100%' border=1><TBODY><TR><TD align=right width='25%' bgColor=#ffffea><P><FONT face=Verdana color=#000080><B>Type:</B></FONT></P></TD><TD width='75%'><FONT face=Arial>Observation</FONT></TD></TR><TR><TD align=right width='25%' bgColor=#ffffea><P><FONT face=Verdana color=#000080><B>Reported By:</B></FONT></P></TD><TD width='75%'><FONT face=Arial>C0004889</FONT></TD></TR><TR><TD align=right width='25%' bgColor=#ffffea><P><FONT face=Verdana color=#000080><B>Company:</B></FONT></P></TD><TD width='75%'><FONT face=Arial>Man Power</FONT></TD></TR><TR><TD align=right width='25%' bgColor=#ffffea><P><FONT face=Verdana color=#000080><B>Description:</B></FONT></P></TD><TD width='75%'><FONT face=Arial>Two persons not wearing High Vis whilst crossing plant roads from Main Control Room to the back of 601. Should they be? both were wearing dark tops and were not very visible.</FONT></TD></TR><TR><TD align=right width='25%' bgColor=#ffffea><P><FONT face=Verdana color=#000080><B>Action Taken/Suggested Solution:</B></FONT></P></TD><TD width='75%'><FONT face=Arial>Reminder signs to wear high vis?</FONT></TD></TR><TR><TD align=right width='25%' bgColor=#ffffea><P><FONT face=Verdana color=#000080><B>Date:</B></FONT></P></TD><TD width='75%'><FONT face=Arial>3/12/2008</FONT></TD></TR><TR><TD align=right width='25%' bgColor=#ffffea><P><FONT face=Verdana color=#000080><B>Time:</B></FONT></P></TD><TD width='75%'><FONT face=Arial>10:43:44 AM</FONT></TD></TR><TR><TD align=right width='25%' bgColor=#ffffea><P><FONT face=Verdana color=#000080><B>Area:</B></FONT></P></TD><TD width='75%'><FONT face=Arial>Plant</FONT></TD></TR><TR><TD align=right width='25%' bgColor=#ffffea><P><FONT face=Verdana color=#000080><B>DC Employee:</B></FONT></P></TD><TD width='75%'><FONT face=Arial>Yes</FONT></TD></TR></TBODY></TABLE>

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-05 : 06:08:30
http://stackoverflow.com/questions/457701/best-way-to-strip-html-tags-from-a-string-in-sql-server
Go to Top of Page
   

- Advertisement -