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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 remove text from field

Author  Topic 

gotafly
Yak Posting Veteran

54 Posts

Posted - 2005-03-09 : 07:53:13
I have a field that has HTML tags in it. I need to remove these tags in a
select statement to populate a dropdown. Here is the select and data:

SELECT QuestionID, Question
FROM FormCreator_Questions
WHERE (QuestionOptionType = 'radio') OR
(QuestionOptionType = 'listbox') OR
(QuestionOptionType = 'checkbox')


21 Can you receive and view HTML e-mails
24 State
27 Birthday
28 <font color=""#FFFFFF"">day</font>
30 How did you hear about our Twist-o-Gram?
32 What would you like to receive<br>from Anne's in the future?
33 Choose the Auntie Anne's nearest you.

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2005-03-09 : 08:07:51
If you need to leave the data intact.
Dump it into a temp table and use replace.
then pull your select from the temp table.

else
use replace on the table.

Jim
Users <> Logic
Go to Top of Page
   

- Advertisement -